pypomes-jwt 1.0.2__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pypomes-jwt might be problematic. Click here for more details.
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/PKG-INFO +3 -3
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/pyproject.toml +3 -3
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/src/pypomes_jwt/jwt_registry.py +6 -6
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/.gitignore +0 -0
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/LICENSE +0 -0
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/README.md +0 -0
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/src/pypomes_jwt/__init__.py +0 -0
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/src/pypomes_jwt/jwt_constants.py +0 -0
- {pypomes_jwt-1.0.2 → pypomes_jwt-1.0.3}/src/pypomes_jwt/jwt_pomes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pypomes_jwt
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: A collection of Python pomes, penyeach (JWT module)
|
|
5
5
|
Project-URL: Homepage, https://github.com/TheWiseCoder/PyPomes-JWT
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/TheWiseCoder/PyPomes-JWT/issues
|
|
@@ -12,5 +12,5 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: >=3.12
|
|
13
13
|
Requires-Dist: cryptography>=44.0.2
|
|
14
14
|
Requires-Dist: pyjwt>=2.10.1
|
|
15
|
-
Requires-Dist: pypomes-core>=1.8.
|
|
16
|
-
Requires-Dist: pypomes-db>=
|
|
15
|
+
Requires-Dist: pypomes-core>=1.8.7
|
|
16
|
+
Requires-Dist: pypomes-db>=2.0.0
|
|
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "pypomes_jwt"
|
|
9
|
-
version = "1.0.
|
|
9
|
+
version = "1.0.3"
|
|
10
10
|
authors = [
|
|
11
11
|
{ name="GT Nunes", email="wisecoder01@gmail.com" }
|
|
12
12
|
]
|
|
@@ -21,8 +21,8 @@ classifiers = [
|
|
|
21
21
|
dependencies = [
|
|
22
22
|
"PyJWT>=2.10.1",
|
|
23
23
|
"cryptography>=44.0.2",
|
|
24
|
-
"pypomes_core>=1.8.
|
|
25
|
-
"pypomes_db>=
|
|
24
|
+
"pypomes_core>=1.8.7",
|
|
25
|
+
"pypomes_db>=2.0.0"
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.urls]
|
|
@@ -388,21 +388,21 @@ def _jwt_persist_token(account_id: str,
|
|
|
388
388
|
for rec in recs:
|
|
389
389
|
token: str = rec[1]
|
|
390
390
|
token_id: int = rec[0]
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
391
|
+
token_payload: dict[str, Any] = (jwt_get_claims(errors=errors,
|
|
392
|
+
token=token,
|
|
393
|
+
logger=logger) or {}).get("payload")
|
|
394
394
|
if errors:
|
|
395
395
|
raise RuntimeError("; ".join(errors))
|
|
396
396
|
|
|
397
397
|
# find expired tokens
|
|
398
|
-
exp: int =
|
|
398
|
+
exp: int = token_payload.get("exp", sys.maxsize)
|
|
399
399
|
if exp < just_now:
|
|
400
400
|
expired.append(token_id)
|
|
401
401
|
|
|
402
402
|
# find oldest token
|
|
403
|
-
iat: int =
|
|
403
|
+
iat: int = token_payload.get("iat", sys.maxsize)
|
|
404
404
|
if iat < oldest_ts:
|
|
405
|
-
oldest_ts =
|
|
405
|
+
oldest_ts = iat
|
|
406
406
|
oldest_id = token_id
|
|
407
407
|
|
|
408
408
|
# remove expired tokens from persistence
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|