pypomes-jwt 1.3.1__tar.gz → 1.3.2__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypomes_jwt
3
- Version: 1.3.1
3
+ Version: 1.3.2
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
@@ -10,8 +10,8 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Requires-Python: >=3.12
13
- Requires-Dist: cryptography>=45.0.6
13
+ Requires-Dist: cryptography>=45.0.7
14
14
  Requires-Dist: flask>=3.1.2
15
15
  Requires-Dist: pyjwt>=2.10.1
16
16
  Requires-Dist: pypomes-core>=2.7.0
17
- Requires-Dist: pypomes-db>=2.5.9
17
+ Requires-Dist: pypomes-db>=2.7.5
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "pypomes_jwt"
9
- version = "1.3.1"
9
+ version = "1.3.2"
10
10
  authors = [
11
11
  { name="GT Nunes", email="wisecoder01@gmail.com" }
12
12
  ]
@@ -19,11 +19,11 @@ classifiers = [
19
19
  "Operating System :: OS Independent"
20
20
  ]
21
21
  dependencies = [
22
- "cryptography>=45.0.6",
22
+ "cryptography>=45.0.7",
23
23
  "Flask>=3.1.2",
24
24
  "PyJWT>=2.10.1",
25
25
  "pypomes_core>=2.7.0",
26
- "pypomes_db>=2.5.9"
26
+ "pypomes_db>=2.7.5"
27
27
  ]
28
28
 
29
29
  [project.urls]
@@ -371,7 +371,6 @@ class JwtRegistry:
371
371
  errors=errors,
372
372
  logger=logger)
373
373
  if not errors:
374
-
375
374
  # retrieve the account's tokens
376
375
  # noinspection PyTypeChecker
377
376
  recs: list[tuple[int, str, str, str]] = \
@@ -385,7 +384,7 @@ class JwtRegistry:
385
384
  if not errors:
386
385
  if logger:
387
386
  logger.debug(msg=f"Retrieved {len(recs)} tokens from storage for account '{account_id}'")
388
- # remove the expired tokens
387
+ # process expired tokens
389
388
  just_now: int = int(datetime.now(tz=UTC).timestamp())
390
389
  oldest_ts: int = sys.maxsize
391
390
  oldest_id: int | None = None
@@ -434,18 +433,23 @@ class JwtRegistry:
434
433
  f"'{account_id}' removed from storage")
435
434
  # persist token
436
435
  if not errors:
437
- result = db_insert(insert_stmt=f"INSERT INTO {JwtDbConfig.TABLE}",
438
- insert_data={
439
- JwtDbConfig.COL_ACCOUNT: account_id,
440
- JwtDbConfig.COL_TOKEN: jwt_token,
441
- JwtDbConfig.COL_ALGORITHM: JwtConfig.DEFAULT_ALGORITHM.value,
442
- JwtDbConfig.COL_DECODER: b64encode(s=JwtConfig.DECODING_KEY.value).decode()
443
- },
444
- return_cols={JwtDbConfig.COL_KID: int},
445
- engine=DbEngine(JwtDbConfig.ENGINE),
446
- connection=curr_conn,
447
- errors=errors,
448
- logger=logger)
436
+ reply: tuple[int] = db_insert(insert_stmt=f"INSERT INTO {JwtDbConfig.TABLE}",
437
+ insert_data={
438
+ JwtDbConfig.COL_ACCOUNT: account_id,
439
+ JwtDbConfig.COL_TOKEN: jwt_token,
440
+ JwtDbConfig.COL_ALGORITHM:
441
+ JwtConfig.DEFAULT_ALGORITHM.value,
442
+ JwtDbConfig.COL_DECODER:
443
+ b64encode(s=JwtConfig.DECODING_KEY.value).decode()
444
+ },
445
+ return_cols={JwtDbConfig.COL_KID: int},
446
+ engine=DbEngine(JwtDbConfig.ENGINE),
447
+ connection=curr_conn,
448
+ errors=errors,
449
+ logger=logger)
450
+ if not errors:
451
+ result = reply[0]
452
+
449
453
  # finish the operation
450
454
  if not db_conn:
451
455
  if errors:
File without changes
File without changes
File without changes