pypomes-jwt 0.8.5__py3-none-any.whl → 0.8.6__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
@@ -151,10 +151,12 @@ class JwtData:
151
151
  :param logger: optional logger
152
152
  return: *True* if the access data was removed, *False* otherwise
153
153
  """
154
+ # remove from internal storage
154
155
  account_data: dict[str, Any] | None
155
156
  with self.access_lock:
156
157
  account_data = self.access_data.pop(account_id, None)
157
158
 
159
+ # remove from database
158
160
  db_delete(errors=None,
159
161
  delete_stmt=f"DELETE FROM {JWT_DB_TABLE}",
160
162
  where_data={JWT_DB_COL_ACCOUNT: account_id},
@@ -242,8 +244,10 @@ class JwtData:
242
244
 
243
245
  # issue a candidate refresh token first, and persist it
244
246
  current_claims["exp"] = just_now + account_data.get("refresh-max-age")
245
- current_claims["valid-from"] = datetime.fromtimestamp(timestamp=current_claims["iat"])
246
- current_claims["valid-until"] = datetime.fromtimestamp(timestamp=current_claims["exp"])
247
+ current_claims["valid-from"] = datetime.fromtimestamp(timestamp=current_claims["iat"],
248
+ tz=timezone.utc).isoformat()
249
+ current_claims["valid-until"] = datetime.fromtimestamp(timestamp=current_claims["exp"],
250
+ tz=timezone.utc).isoformat()
247
251
  # may raise an exception
248
252
  refresh_token: str = jwt.encode(payload=current_claims,
249
253
  key=JWT_ENCODING_KEY,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypomes_jwt
3
- Version: 0.8.5
3
+ Version: 0.8.6
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
@@ -0,0 +1,8 @@
1
+ pypomes_jwt/__init__.py,sha256=P7rT6ZVE2BzU3ntYOr83H5iOf5JcCmjDUYakNbrRAP0,1266
2
+ pypomes_jwt/jwt_constants.py,sha256=FA50jKQ3D09MxXkUpVkXW5IQqm_UX6qm3bU5gHvkU-4,3980
3
+ pypomes_jwt/jwt_data.py,sha256=CAgqM60167yg-wnJEhky5_lu4GxVwDj0Qk8doD7PrCk,22461
4
+ pypomes_jwt/jwt_pomes.py,sha256=BNL6r-IfnKKeBZFpTzFXQUnotFKgV6PeKHqar9Ys20I,17186
5
+ pypomes_jwt-0.8.6.dist-info/METADATA,sha256=I-8EBiC62CNBvRBO_GH4oyYfxMncBaOy-jfslBSCMzk,632
6
+ pypomes_jwt-0.8.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ pypomes_jwt-0.8.6.dist-info/licenses/LICENSE,sha256=NdakochSXm_H_-DSL_x2JlRCkYikj3snYYvTwgR5d_c,1086
8
+ pypomes_jwt-0.8.6.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- pypomes_jwt/__init__.py,sha256=P7rT6ZVE2BzU3ntYOr83H5iOf5JcCmjDUYakNbrRAP0,1266
2
- pypomes_jwt/jwt_constants.py,sha256=FA50jKQ3D09MxXkUpVkXW5IQqm_UX6qm3bU5gHvkU-4,3980
3
- pypomes_jwt/jwt_data.py,sha256=wRXLM8U5gb2JYDiv0G3R4n4npZyFJ_93tFI8A4BwROc,22180
4
- pypomes_jwt/jwt_pomes.py,sha256=BNL6r-IfnKKeBZFpTzFXQUnotFKgV6PeKHqar9Ys20I,17186
5
- pypomes_jwt-0.8.5.dist-info/METADATA,sha256=mMCgIa9kXt8WBVxxpI86ge27VYm2gg8rBAfzmnK6_Hc,632
6
- pypomes_jwt-0.8.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- pypomes_jwt-0.8.5.dist-info/licenses/LICENSE,sha256=NdakochSXm_H_-DSL_x2JlRCkYikj3snYYvTwgR5d_c,1086
8
- pypomes_jwt-0.8.5.dist-info/RECORD,,