pypomes-iam 0.6.9__tar.gz → 0.7.0__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.
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/PKG-INFO +1 -1
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/pyproject.toml +1 -1
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/src/pypomes_iam/iam_actions.py +10 -2
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/.gitignore +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/LICENSE +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/README.md +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/src/__init__.py +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/src/pypomes_iam/__init__.py +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/src/pypomes_iam/iam_common.py +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/src/pypomes_iam/iam_pomes.py +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/src/pypomes_iam/iam_services.py +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/src/pypomes_iam/provider_pomes.py +0 -0
- {pypomes_iam-0.6.9 → pypomes_iam-0.7.0}/src/pypomes_iam/token_pomes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pypomes_iam
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.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
|
|
@@ -308,7 +308,13 @@ def action_exchange(iam_server: IamServer,
|
|
|
308
308
|
|
|
309
309
|
# obtain the token to be exchanged
|
|
310
310
|
token: str = args.get("access-token") if user_id else None
|
|
311
|
-
|
|
311
|
+
token_claims: dict[str, dict[str, Any]] = token_get_claims(token=token,
|
|
312
|
+
errors=errors,
|
|
313
|
+
logger=logger) if token else None
|
|
314
|
+
token_issuer: str = _iam_server_from_issuer(issuer=token_claims["payload"]["iss"],
|
|
315
|
+
errors=errors,
|
|
316
|
+
logger=logger) if token_claims else None
|
|
317
|
+
if not errors:
|
|
312
318
|
# HAZARD: only 'IAM_KEYCLOAK' is currently supported
|
|
313
319
|
with _iam_lock:
|
|
314
320
|
# retrieve the IAM server's registry
|
|
@@ -324,6 +330,8 @@ def action_exchange(iam_server: IamServer,
|
|
|
324
330
|
logger=logger)
|
|
325
331
|
if not errors:
|
|
326
332
|
# exchange the token
|
|
333
|
+
if logger:
|
|
334
|
+
logger.debug(msg=f"Requesting the token exchange to IAM server '{iam_server}'")
|
|
327
335
|
header_data: dict[str, Any] = {
|
|
328
336
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
329
337
|
}
|
|
@@ -333,7 +341,7 @@ def action_exchange(iam_server: IamServer,
|
|
|
333
341
|
"subject_token_type": "urn:ietf:params:oauth:token-type:access_token",
|
|
334
342
|
"requested_token_type": "urn:ietf:params:oauth:token-type:access_token",
|
|
335
343
|
"audience": registry[IamParam.CLIENT_ID],
|
|
336
|
-
"subject_issuer":
|
|
344
|
+
"subject_issuer": token_issuer
|
|
337
345
|
}
|
|
338
346
|
now: int = int(datetime.now(tz=TZ_LOCAL).timestamp())
|
|
339
347
|
token_data: dict[str, Any] = __post_for_token(iam_server=iam_server,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|