Skip to content

Commit 4d19ae1

Browse files
committed
Fixes handling and updated README
1 parent fdb0e44 commit 4d19ae1

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ def device_data():
314314

315315
## Changelog
316316

317+
### 2023-10-13 - v0.5.3
318+
- Fix handling of `last_request_timestamp` when checking auth
319+
317320
### 2023-10-12 - v0.5.2
318321
- Clarification in the doc of the behaviour when `secret_key` is missing
319322
- Implemented coherent behaviour when `secret_key` is missing

openpaygo/metrics_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def is_auth_valid(self):
5353
new_signature = OpenPAYGOMetricsShared.generate_request_signature_from_data(self.request_dict, self.auth_method, self.secret_key)
5454
if auth_string == new_signature:
5555
request_count = self.get_request_count()
56-
if request_count and self.last_request_count and request_count > self.last_request_count:
56+
if request_count and self.last_request_count and request_count <= self.last_request_count:
5757
return False
5858
timestamp = self.get_request_timestamp()
59-
if timestamp and self.last_request_timestamp and timestamp > self.last_request_timestamp:
59+
if timestamp and self.last_request_timestamp and timestamp <= self.last_request_timestamp:
6060
return False
6161
# Either the request count or timestamp is required
6262
if request_count or timestamp:

setup.cfg

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
[metadata]
22
name = openpaygo
3-
version = 0.5.2
3+
version = 0.5.3
44
description = OpenPAYGO library in Python
55
long_description = file: README.md
66
long_description_content_type = text/markdown
77
url = https://github.com/EnAccess/OpenPAYGO-python/
8-
# author = EnAccess Fundation
9-
# author_email = info@enaccess.org
108
license = MIT License
119
license_files = LICENSE
1210
project_urls =
13-
Homepage = https://enaccess.org/materials/openpaygotoken/
14-
# Documentation = https://github.com/EnAccess/OpenPAYGO-python/
11+
Homepage = https://github.com/EnAccess/OpenPAYGO-python/
12+
Documentation = https://github.com/EnAccess/OpenPAYGO-python/
1513
Changes = https://github.com/EnAccess/OpenPAYGO-python/releases
1614
Source = https://github.com/EnAccess/OpenPAYGO-python/
17-
Issue Tracker = https://github.com/EnAccess/OpenPAYGO-python//issues
18-
Twitter = https://twitter.com/EnAccessFdn
19-
Chat = https://community.enaccess.org/
15+
Issues = https://github.com/EnAccess/OpenPAYGO-python/issues
2016
classifiers =
2117
Development Status :: 5 - Production/Stable
2218
Intended Audience :: Developers

0 commit comments

Comments
 (0)