pypomes-jwt 1.2.0__py3-none-any.whl → 1.2.1__py3-none-any.whl

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/jwt_pomes.py CHANGED
@@ -8,7 +8,6 @@ from pypomes_db import (
8
8
  DbEngine, db_connect, db_commit,
9
9
  db_rollback, db_select, db_delete
10
10
  )
11
- from pypomes_logging import PYPOMES_LOGGER
12
11
  from typing import Any
13
12
 
14
13
  from .jwt_config import JwtConfig, JwtDbConfig
@@ -86,7 +85,7 @@ def jwt_set_account(account_id: str,
86
85
  access_max_age: int = JwtConfig.ACCESS_MAX_AGE.value,
87
86
  refresh_max_age: int = JwtConfig.REFRESH_MAX_AGE.value,
88
87
  lead_interval: int = None,
89
- logger: Logger = PYPOMES_LOGGER) -> None:
88
+ logger: Logger = None) -> None:
90
89
  """
91
90
  Establish the data needed to obtain JWT tokens for *account_id*.
92
91
 
@@ -115,7 +114,7 @@ def jwt_set_account(account_id: str,
115
114
 
116
115
 
117
116
  def jwt_remove_account(account_id: str,
118
- logger: Logger = PYPOMES_LOGGER) -> bool:
117
+ logger: Logger = None) -> bool:
119
118
  """
120
119
  Remove from storage the JWT access data for *account_id*.
121
120
 
@@ -134,7 +133,7 @@ def jwt_validate_token(errors: list[str] | None,
134
133
  token: str,
135
134
  nature: str = None,
136
135
  account_id: str = None,
137
- logger: Logger = PYPOMES_LOGGER) -> dict[str, Any] | None:
136
+ logger: Logger = None) -> dict[str, Any] | None:
138
137
  """
139
138
  Verify if *token* ia a valid JWT token.
140
139
 
@@ -259,7 +258,7 @@ def jwt_validate_token(errors: list[str] | None,
259
258
  def jwt_revoke_token(errors: list[str] | None,
260
259
  account_id: str,
261
260
  token: str,
262
- logger: Logger = PYPOMES_LOGGER) -> bool:
261
+ logger: Logger = None) -> bool:
263
262
  """
264
263
  Revoke the *refresh_token* associated with *account_id*.
265
264
 
@@ -312,7 +311,7 @@ def jwt_issue_token(errors: list[str] | None,
312
311
  duration: int,
313
312
  lead_interval: int = None,
314
313
  claims: dict[str, Any] = None,
315
- logger: Logger = PYPOMES_LOGGER) -> str:
314
+ logger: Logger = None) -> str:
316
315
  """
317
316
  Issue or refresh, and return, a JWT token associated with *account_id*, of the specified *nature*.
318
317
 
@@ -363,7 +362,7 @@ def jwt_issue_token(errors: list[str] | None,
363
362
  def jwt_issue_tokens(errors: list[str] | None,
364
363
  account_id: str,
365
364
  account_claims: dict[str, Any] = None,
366
- logger: Logger = PYPOMES_LOGGER) -> dict[str, Any]:
365
+ logger: Logger = None) -> dict[str, Any]:
367
366
  """
368
367
  Issue the JWT token pair associated with *account_id*, for access and refresh operations.
369
368
 
@@ -417,7 +416,7 @@ def jwt_issue_tokens(errors: list[str] | None,
417
416
  def jwt_refresh_tokens(errors: list[str] | None,
418
417
  account_id: str,
419
418
  refresh_token: str,
420
- logger: Logger = PYPOMES_LOGGER) -> dict[str, Any]:
419
+ logger: Logger = None) -> dict[str, Any]:
421
420
  """
422
421
  Refresh the JWT token pair associated with *account_id*, for access and refresh operations.
423
422
 
@@ -515,7 +514,7 @@ def jwt_refresh_tokens(errors: list[str] | None,
515
514
 
516
515
  def jwt_get_claims(errors: list[str] | None,
517
516
  token: str,
518
- logger: Logger = PYPOMES_LOGGER) -> dict[str, Any] | None:
517
+ logger: Logger = None) -> dict[str, Any] | None:
519
518
  """
520
519
  Retrieve and return the claims set of a JWT *token*.
521
520
 
@@ -9,7 +9,6 @@ from pypomes_db import (
9
9
  DbEngine, db_connect, db_commit, db_rollback,
10
10
  db_select, db_insert, db_update, db_delete
11
11
  )
12
- from pypomes_logging import PYPOMES_LOGGER
13
12
  from threading import Lock
14
13
  from typing import Any
15
14
 
@@ -89,7 +88,7 @@ class JwtRegistry:
89
88
  access_max_age: int,
90
89
  refresh_max_age: int,
91
90
  lead_interval: int | None,
92
- logger: Logger = PYPOMES_LOGGER) -> None:
91
+ logger: Logger = None) -> None:
93
92
  """
94
93
  Add to storage the parameters needed to produce and validate JWT tokens for *account_id*.
95
94
 
@@ -153,7 +152,7 @@ class JwtRegistry:
153
152
  duration: int,
154
153
  lead_interval: int = None,
155
154
  claims: dict[str, Any] = None,
156
- logger: Logger = PYPOMES_LOGGER) -> str:
155
+ logger: Logger = None) -> str:
157
156
  """
158
157
  Issue an return a JWT token associated with *account_id*.
159
158
 
@@ -213,7 +212,7 @@ class JwtRegistry:
213
212
  account_id: str,
214
213
  account_claims: dict[str, Any] = None,
215
214
  db_conn: Any = None,
216
- logger: Logger = PYPOMES_LOGGER) -> dict[str, Any]:
215
+ logger: Logger = None) -> dict[str, Any]:
217
216
  """
218
217
  Issue and return a JWT token pair associated with *account_id*.
219
218
 
@@ -320,7 +319,7 @@ class JwtRegistry:
320
319
 
321
320
  def get_account_data(self,
322
321
  account_id: str,
323
- logger: Logger = PYPOMES_LOGGER) -> dict[str, Any]:
322
+ logger: Logger = None) -> dict[str, Any]:
324
323
  """
325
324
  Retrieve the JWT access data associated with *account_id*.
326
325
 
@@ -342,7 +341,7 @@ class JwtRegistry:
342
341
  def jwt_persist_token(account_id: str,
343
342
  jwt_token: str,
344
343
  db_conn: Any,
345
- logger: Logger = PYPOMES_LOGGER) -> int:
344
+ logger: Logger = None) -> int:
346
345
  """
347
346
  Persist the given token, making sure that the account limit is complied with.
348
347
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypomes_jwt
3
- Version: 1.2.0
3
+ Version: 1.2.1
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>=44.0.2
13
+ Requires-Dist: cryptography>=45.0.0
14
+ Requires-Dist: flask>=3.1.1
14
15
  Requires-Dist: pyjwt>=2.10.1
15
- Requires-Dist: pypomes-core>=2.0.6
16
- Requires-Dist: pypomes-db>=2.1.5
17
- Requires-Dist: pypomes-logging>=0.6.1
16
+ Requires-Dist: pypomes-core>=2.2.9
17
+ Requires-Dist: pypomes-db>=2.2.1
@@ -0,0 +1,8 @@
1
+ pypomes_jwt/__init__.py,sha256=NZzjWKnhjxNuoE32V6soKo9sG5ypmt25V0mBAh3rAIs,793
2
+ pypomes_jwt/jwt_config.py,sha256=mtihd58_O00FuFXcNBKsabftG6UHu3Cj24i6cZXoskc,3096
3
+ pypomes_jwt/jwt_pomes.py,sha256=-uTLk9Zvy81iFVWDmCgEKWwn9sUZpa3bPwLT9gsAgt0,23887
4
+ pypomes_jwt/jwt_registry.py,sha256=QJBrqm38N8mZiWi2PDii7jOKL6xdQkYGYmdEv-TA5Rs,22562
5
+ pypomes_jwt-1.2.1.dist-info/METADATA,sha256=P1EG-gd9iCLqRuwEc5OVgJEJFaazF1AR0SVDV3hVhb0,660
6
+ pypomes_jwt-1.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ pypomes_jwt-1.2.1.dist-info/licenses/LICENSE,sha256=NdakochSXm_H_-DSL_x2JlRCkYikj3snYYvTwgR5d_c,1086
8
+ pypomes_jwt-1.2.1.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- pypomes_jwt/__init__.py,sha256=NZzjWKnhjxNuoE32V6soKo9sG5ypmt25V0mBAh3rAIs,793
2
- pypomes_jwt/jwt_config.py,sha256=mtihd58_O00FuFXcNBKsabftG6UHu3Cj24i6cZXoskc,3096
3
- pypomes_jwt/jwt_pomes.py,sha256=ptfxnBBtVVan0mBpHtmNto3yBBIDGp29JGeOGN8kD-8,24011
4
- pypomes_jwt/jwt_registry.py,sha256=os-lK7FAzBHfu43VS2Xkz8n_wVpM9Hp4qUtjVxd-xj8,22656
5
- pypomes_jwt-1.2.0.dist-info/METADATA,sha256=vDbuVcGkI-1rdP8XTqsaZ9mcs3NS3THqnMtD6wD8rFM,670
6
- pypomes_jwt-1.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- pypomes_jwt-1.2.0.dist-info/licenses/LICENSE,sha256=NdakochSXm_H_-DSL_x2JlRCkYikj3snYYvTwgR5d_c,1086
8
- pypomes_jwt-1.2.0.dist-info/RECORD,,