pypomes-iam 0.2.2__tar.gz → 0.2.4__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-iam might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypomes_iam
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: A collection of Python pomes, penyeach (IAM modules)
5
5
  Project-URL: Homepage, https://github.com/TheWiseCoder/PyPomes-IAM
6
6
  Project-URL: Bug Tracker, https://github.com/TheWiseCoder/PyPomes-IAM/issues
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
 
7
7
  [project]
8
8
  name = "pypomes_iam"
9
- version = "0.2.2"
9
+ version = "0.2.4"
10
10
  authors = [
11
11
  { name="GT Nunes", email="wisecoder01@gmail.com" }
12
12
  ]
@@ -292,9 +292,9 @@ def _get_user_data(registry: dict[str, Any],
292
292
  }
293
293
  users[user_id] = result
294
294
  if logger:
295
- logger.debug(msg=f"Entry for user '{user_id}' added to the registry")
295
+ logger.debug(msg=f"Entry for '{user_id}' added to the registry")
296
296
  elif logger:
297
- logger.debug(msg=f"Entry for user '{user_id}' obtained from the registry")
297
+ logger.debug(msg=f"Entry for '{user_id}' obtained from the registry")
298
298
 
299
299
  return result
300
300
 
@@ -1,4 +1,4 @@
1
- from cachetools import FIFOCache
1
+ from cachetools import Cache, FIFOCache
2
2
  from datetime import datetime
3
3
  from flask import Flask
4
4
  from logging import Logger
@@ -37,9 +37,9 @@ JUSBR_URL_AUTH_CALLBACK: Final[str] = env_get_str(key=f"{APP_PREFIX}_JUSBR_URL_A
37
37
  # "key-expiration": <int>,
38
38
  # "base-url": <str>,
39
39
  # "callback-url": <str>,
40
- # "cache-obj": <FIFOCache>
40
+ # "safe-cache": <FIFOCache>
41
41
  # }
42
- # data in "cache-obj":
42
+ # data in "safe-cache":
43
43
  # {
44
44
  # "users": {
45
45
  # "<user-id>": {
@@ -91,9 +91,11 @@ def jusbr_setup(flask_app: Flask,
91
91
  global _jusbr_logger, _jusbr_registry
92
92
 
93
93
  # establish the logger
94
- _logger = logger
94
+ _jusbr_logger = logger
95
95
 
96
96
  # configure the JusBR registry
97
+ safe_cache: Cache = FIFOCache(maxsize=1048576)
98
+ safe_cache["users"] = {}
97
99
  _jusbr_registry = {
98
100
  "client-id": client_id,
99
101
  "client-secret": client_secret,
@@ -102,7 +104,7 @@ def jusbr_setup(flask_app: Flask,
102
104
  "callback-url": callback_url,
103
105
  "key-expiration": int(datetime.now(tz=TZ_LOCAL).timestamp()),
104
106
  "key-lifetime": public_key_lifetime,
105
- "cache-obj": FIFOCache(maxsize=1048576)
107
+ "safe-cache": safe_cache
106
108
  }
107
109
 
108
110
  # establish the endpoints
@@ -1,4 +1,4 @@
1
- from cachetools import FIFOCache
1
+ from cachetools import Cache, FIFOCache
2
2
  from datetime import datetime
3
3
  from flask import Flask
4
4
  from logging import Logger
@@ -97,6 +97,8 @@ def keycloak_setup(flask_app: Flask,
97
97
  _keycloak_logger = logger
98
98
 
99
99
  # configure the JusBR registry
100
+ safe_cache: Cache = FIFOCache(maxsize=1048576)
101
+ safe_cache["users"] = {}
100
102
  _keycloak_registry = {
101
103
  "client-id": client_id,
102
104
  "client-secret": client_secret,
@@ -105,7 +107,7 @@ def keycloak_setup(flask_app: Flask,
105
107
  "callback-url": callback_url,
106
108
  "key-expiration": int(datetime.now(tz=TZ_LOCAL).timestamp()),
107
109
  "key-lifetime": public_key_lifetime,
108
- "safe-cache": FIFOCache(maxsize=1048576)
110
+ "safe-cache": safe_cache
109
111
  }
110
112
 
111
113
  # establish the endpoints
File without changes
File without changes
File without changes