pypomes-jwt 0.8.7__tar.gz → 0.8.8__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: 0.8.7
3
+ Version: 0.8.8
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.4
15
+ Requires-Dist: pypomes-core>=1.8.5
16
16
  Requires-Dist: pypomes-db>=1.9.6
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "pypomes_jwt"
9
- version = "0.8.7"
9
+ version = "0.8.8"
10
10
  authors = [
11
11
  { name="GT Nunes", email="wisecoder01@gmail.com" }
12
12
  ]
@@ -21,7 +21,7 @@ classifiers = [
21
21
  dependencies = [
22
22
  "PyJWT>=2.10.1",
23
23
  "cryptography>=44.0.2",
24
- "pypomes_core>=1.8.4",
24
+ "pypomes_core>=1.8.5",
25
25
  "pypomes_db>=1.9.6"
26
26
  ]
27
27
 
@@ -50,7 +50,7 @@ JWT_ACCOUNT_LIMIT: Final[int] = env_get_int(key=f"{APP_PREFIX}_JWT_ACCOUNT_LIMIT
50
50
 
51
51
  # recommended: allow the encode and decode keys to be generated anew when app starts
52
52
  __encoding_key: bytes = env_get_bytes(key=f"{APP_PREFIX}_JWT_ENCODE_KEY",
53
- style="base64")
53
+ encoding="base64url")
54
54
  __decoding_key: bytes
55
55
  if JWT_DEFAULT_ALGORITHM in ["HS256", "HS512"]:
56
56
  if not __encoding_key:
@@ -1,3 +1,4 @@
1
+ import base64
1
2
  import jwt
2
3
  import requests
3
4
  import string
@@ -452,7 +453,7 @@ def _jwt_persist_token(errors: list[str],
452
453
  insert_data={JWT_DB_COL_ACCOUNT: account_id,
453
454
  JWT_DB_COL_TOKEN: jwt_token,
454
455
  JWT_DB_COL_ALGORITHM: JWT_DEFAULT_ALGORITHM,
455
- JWT_DB_COL_DECODER: JWT_DECODING_KEY.hex()},
456
+ JWT_DB_COL_DECODER: base64.urlsafe_b64encode(JWT_DECODING_KEY).decode()},
456
457
  connection=db_conn,
457
458
  logger=logger)
458
459
  if errors:
@@ -1,3 +1,4 @@
1
+ import base64
1
2
  import jwt
2
3
  from flask import Request, Response, request
3
4
  from logging import Logger
@@ -198,7 +199,7 @@ def jwt_validate_token(errors: list[str] | None,
198
199
  logger=logger)
199
200
  if recs:
200
201
  token_alg = recs[0][0]
201
- token_decoder = bytes.fromhex(recs[0][1])
202
+ token_decoder = base64.urlsafe_b64decode(recs[0][1])
202
203
  else:
203
204
  op_errors.append("Invalid token")
204
205
  else:
File without changes
File without changes
File without changes
File without changes