pypomes-jwt 0.5.0__py3-none-any.whl → 0.5.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_data.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import jwt
2
2
  import math
3
3
  import requests
4
- from datetime import datetime, timedelta
4
+ from datetime import datetime, timedelta, timezone
5
5
  from jwt.exceptions import InvalidTokenError
6
6
  from logging import Logger
7
7
  from requests import Response
@@ -98,7 +98,7 @@ class JwtData:
98
98
  "access-max-age": access_max_age,
99
99
  "request-timeout": request_timeout,
100
100
  "local-provider": local_provider,
101
- "refresh-exp": datetime.utcnow() + timedelta(seconds=refresh_max_age)
101
+ "refresh-exp": datetime.now(timezone.utc) + timedelta(seconds=refresh_max_age)
102
102
  }
103
103
  if algorithm in ["HS256", "HS512"]:
104
104
  control_data["secret-key"] = secret_key
@@ -190,7 +190,7 @@ class JwtData:
190
190
  control_data: dict[str, Any] = item_data.get("control-data")
191
191
  custom_claims: dict[str, Any] = item_data.get("custom-claims")
192
192
  standard_claims: dict[str, Any] = item_data.get("standard-claims")
193
- just_now: datetime = datetime.utcnow()
193
+ just_now: datetime = datetime.now(timezone.utc)
194
194
 
195
195
  # is the current token still valid ?
196
196
  if just_now > standard_claims.get("exp"):
@@ -1,18 +1,17 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pypomes_jwt
3
- Version: 0.5.0
3
+ Version: 0.5.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
7
7
  Author-email: GT Nunes <wisecoder01@gmail.com>
8
- License-File: LICENSE
9
8
  Classifier: License :: OSI Approved :: MIT License
10
9
  Classifier: Operating System :: OS Independent
11
10
  Classifier: Programming Language :: Python :: 3
12
- Requires-Python: >=3.10
13
- Requires-Dist: pip>=24.2
14
- Requires-Dist: pyjwt>=2.9.0
15
- Requires-Dist: pypomes-core>=1.5.3
16
- Requires-Dist: pypomes-crypto>=0.3.0
17
- Requires-Dist: setuptools>=75.1.0
18
- Requires-Dist: wheel>=0.44.0
11
+ Requires-Python: >=3.12
12
+ Requires-Dist: pip>=24.3.1
13
+ Requires-Dist: pyjwt>=2.10.0
14
+ Requires-Dist: pypomes-core>=1.6.2
15
+ Requires-Dist: pypomes-crypto>=0.3.1
16
+ Requires-Dist: setuptools>=75.5.0
17
+ Requires-Dist: wheel>=0.45.0
@@ -0,0 +1,7 @@
1
+ pypomes_jwt/__init__.py,sha256=1IyBb94cZjkXMibHrH_vh043b06QFh5UQ6HTYSDau28,978
2
+ pypomes_jwt/jwt_data.py,sha256=iRyJZhmx1NJOMXAvJUB5yTIZSTgutQ0fFeYmvmyzo2o,17524
3
+ pypomes_jwt/jwt_pomes.py,sha256=IKfpvC3FO3ts-xfHQMxkPYQjeUjWrbVFOqXnNYJTKnM,11090
4
+ pypomes_jwt-0.5.1.dist-info/METADATA,sha256=3dHLb84c8txBDFYagpN4rFjNIw2zbvtHeiuCJ7h_Ll0,668
5
+ pypomes_jwt-0.5.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
6
+ pypomes_jwt-0.5.1.dist-info/licenses/LICENSE,sha256=NdakochSXm_H_-DSL_x2JlRCkYikj3snYYvTwgR5d_c,1086
7
+ pypomes_jwt-0.5.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.25.0
2
+ Generator: hatchling 1.26.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,7 +0,0 @@
1
- pypomes_jwt/__init__.py,sha256=1IyBb94cZjkXMibHrH_vh043b06QFh5UQ6HTYSDau28,978
2
- pypomes_jwt/jwt_data.py,sha256=g8wnWYI7bueCIuK67eW2Uy21ALYk5RbLigUHwljjzt4,17496
3
- pypomes_jwt/jwt_pomes.py,sha256=IKfpvC3FO3ts-xfHQMxkPYQjeUjWrbVFOqXnNYJTKnM,11090
4
- pypomes_jwt-0.5.0.dist-info/METADATA,sha256=0qWRdffYJRoy2Y69pgZGiB7BxJuIlcurNGvghFMGCxk,687
5
- pypomes_jwt-0.5.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
6
- pypomes_jwt-0.5.0.dist-info/licenses/LICENSE,sha256=NdakochSXm_H_-DSL_x2JlRCkYikj3snYYvTwgR5d_c,1086
7
- pypomes_jwt-0.5.0.dist-info/RECORD,,