pypomes-iam 0.5.9__py3-none-any.whl → 0.6.0__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-iam might be problematic. Click here for more details.

pypomes_iam/iam_common.py CHANGED
@@ -13,7 +13,7 @@ class IamServer(StrEnum):
13
13
  """
14
14
  Supported IAM servers.
15
15
  """
16
- JUSRBR = auto()
16
+ JUSBR = auto()
17
17
  KEYCLOAK = auto()
18
18
 
19
19
 
@@ -58,7 +58,6 @@ class UserParam(StrEnum):
58
58
  # Specifying configuration parameters with environment variables can be done in two ways:
59
59
  #
60
60
  # 1. for a single *IAM* server, specify the data set
61
- # - *<APP_PREFIX>_IAM_SERVER* (required, one of *jusbr*, *keycloak*)
62
61
  # - *<APP_PREFIX>_IAM_ADMIN_ID* (optional, needed only if administrative duties are performed)
63
62
  # - *<APP_PREFIX>_IAM_ADMIN_PWD* (optional, needed only if administrative duties are performed)
64
63
  # - *<APP_PREFIX>_IAM_CLIENT_ID* (required)
@@ -358,21 +357,15 @@ def _get_iam_registry(iam_server: IamServer,
358
357
  :param logger: optional logger
359
358
  :return: the registry associated with *iam_server*, or *None* if the server is unknown
360
359
  """
361
- # declare the return variable
362
- result: dict[str, Any] | None
363
-
364
- match iam_server:
365
- case IamServer.JUSRBR:
366
- result = _IAM_SERVERS[IamServer.JUSRBR]
367
- case IamServer.KEYCLOAK:
368
- result = _IAM_SERVERS[IamServer.KEYCLOAK]
369
- case _:
370
- result = None
371
- msg = f"Unknown IAM server '{iam_server}'"
372
- if logger:
373
- logger.error(msg=msg)
374
- if isinstance(errors, list):
375
- errors.append(msg)
360
+ # assign the return variable
361
+ result: dict[str, Any] = _IAM_SERVERS.get(iam_server)
362
+
363
+ if not result:
364
+ msg = f"Unknown IAM server '{iam_server}'"
365
+ if logger:
366
+ logger.error(msg=msg)
367
+ if isinstance(errors, list):
368
+ errors.append(msg)
376
369
 
377
370
  return result
378
371
 
pypomes_iam/iam_pomes.py CHANGED
@@ -113,11 +113,11 @@ def iam_get_env_parameters(iam_prefix: str = None) -> dict[str, Any]:
113
113
  :return: the sorted parameters classified by *prefix*
114
114
  """
115
115
  return {
116
- "url_base": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_URL_BASE"),
116
+ "base_url": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_URL_AUTH_BASE"),
117
117
  "client_id": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_CLIENT_ID"),
118
118
  "client_realm": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_CLIENT_REALM"),
119
119
  "client_secret": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_CLIENT_SECRET"),
120
- "recipient_attr": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_RECIPIENT_ATTR"),
120
+ "recipient_attribute": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_RECIPIENT_ATTR"),
121
121
  "admin_id": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_ADMIN_ID"),
122
122
  "admin_secret": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_ADMIN_SECRET"),
123
123
  "login_timeout": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_LOGIN_TIMEOUT"),
@@ -125,7 +125,7 @@ def iam_get_env_parameters(iam_prefix: str = None) -> dict[str, Any]:
125
125
  "callback_endpoint": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_ENDPOINT_CALLBACK"),
126
126
  "exchange_endpoint": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_ENDPOINT_EXCHANGE"),
127
127
  "login_endpoint": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_ENDPOINT_LOGIN"),
128
- "logout_endpoint": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}__ENDPOINT_LOGOUT"),
128
+ "logout_endpoint": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_ENDPOINT_LOGOUT"),
129
129
  "token_endpoint": env_get_str(key=f"{APP_PREFIX}_{iam_prefix}_ENDPOINT_TOKEN")
130
130
  }
131
131
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypomes_iam
3
- Version: 0.5.9
3
+ Version: 0.6.0
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
@@ -1,11 +1,11 @@
1
1
  pypomes_iam/__init__.py,sha256=_6tSFfjuU-5p6TAMqNLHSL6IQmaJMSYuEW-TG3ybhTI,1044
2
2
  pypomes_iam/iam_actions.py,sha256=Bmd8rBg3948Afsg10B6B1ZrFY4wYtbxi55rX4Rlqiyk,39167
3
- pypomes_iam/iam_common.py,sha256=asgool1T1ja1RKtQP1h71EeG3SJf8UX59NEDisHqLb8,15672
4
- pypomes_iam/iam_pomes.py,sha256=fSB4KnCVM9HKZ6_LBfud9vtMM4psNQPrP98QDal3l9Y,7342
3
+ pypomes_iam/iam_common.py,sha256=4sn9V4_fRXrljz41Dh7P6ng4aqFfp0pLnrq_rURDKt4,15363
4
+ pypomes_iam/iam_pomes.py,sha256=XkxpwwGivUR3Y1TKR6McrqLUnpFJhRvIrsEn9T_Ut9A,7351
5
5
  pypomes_iam/iam_services.py,sha256=IkCjrKDX1Ix7BiHh-BL3VKz5xogcNC8prXkHyJzQoZ8,15862
6
6
  pypomes_iam/provider_pomes.py,sha256=N0nL9_hgHmAjG9JKFoXC33zk8b1ckPG1veu1jTp-2JE,8045
7
7
  pypomes_iam/token_pomes.py,sha256=K4nSAotKUoHIE2s3ltc_nVimlNeKS9tnD-IlslkAvkk,6626
8
- pypomes_iam-0.5.9.dist-info/METADATA,sha256=iTKxygsO09k_vx4DEmbTc7IIkwt1_8Fu9z-YpybSM24,694
9
- pypomes_iam-0.5.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- pypomes_iam-0.5.9.dist-info/licenses/LICENSE,sha256=YvUELgV8qvXlaYsy9hXG5EW3Bmsrkw-OJmmILZnonAc,1086
11
- pypomes_iam-0.5.9.dist-info/RECORD,,
8
+ pypomes_iam-0.6.0.dist-info/METADATA,sha256=xl-01mkMhab71h8WMqADHpX5qxS5ngFfcMyhSouQwt0,694
9
+ pypomes_iam-0.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ pypomes_iam-0.6.0.dist-info/licenses/LICENSE,sha256=YvUELgV8qvXlaYsy9hXG5EW3Bmsrkw-OJmmILZnonAc,1086
11
+ pypomes_iam-0.6.0.dist-info/RECORD,,