pypomes-iam 0.8.2__py3-none-any.whl → 0.8.3__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_services.py +8 -8
- pypomes_iam/provider_pomes.py +10 -7
- {pypomes_iam-0.8.2.dist-info → pypomes_iam-0.8.3.dist-info}/METADATA +1 -1
- {pypomes_iam-0.8.2.dist-info → pypomes_iam-0.8.3.dist-info}/RECORD +6 -6
- {pypomes_iam-0.8.2.dist-info → pypomes_iam-0.8.3.dist-info}/WHEEL +0 -0
- {pypomes_iam-0.8.2.dist-info → pypomes_iam-0.8.3.dist-info}/licenses/LICENSE +0 -0
pypomes_iam/iam_services.py
CHANGED
|
@@ -163,7 +163,7 @@ def service_setup_server() -> Response:
|
|
|
163
163
|
:return: *Response OK*
|
|
164
164
|
"""
|
|
165
165
|
# retrieve the request arguments
|
|
166
|
-
args: dict[str, Any] = dict(request.json) if request.is_json else dict(request.form)
|
|
166
|
+
args: dict[str, Any] = (dict(request.json) if request.is_json else dict(request.form)) or {}
|
|
167
167
|
|
|
168
168
|
# log the request
|
|
169
169
|
if __IAM_LOGGER:
|
|
@@ -209,7 +209,7 @@ def service_login() -> Response:
|
|
|
209
209
|
result: Response | None = None
|
|
210
210
|
|
|
211
211
|
# retrieve the request arguments
|
|
212
|
-
args: dict[str, Any] = dict(request.args)
|
|
212
|
+
args: dict[str, Any] = dict(request.args) or {}
|
|
213
213
|
|
|
214
214
|
# log the request
|
|
215
215
|
if __IAM_LOGGER:
|
|
@@ -261,7 +261,7 @@ def service_logout() -> Response:
|
|
|
261
261
|
result: Response | None
|
|
262
262
|
|
|
263
263
|
# retrieve the request arguments
|
|
264
|
-
args: dict[str, Any] = dict(request.args)
|
|
264
|
+
args: dict[str, Any] = dict(request.args) or {}
|
|
265
265
|
|
|
266
266
|
# log the request
|
|
267
267
|
if __IAM_LOGGER:
|
|
@@ -319,7 +319,7 @@ def service_callback() -> Response:
|
|
|
319
319
|
:return: *Response* containing the reference user identification and the token, or *BAD REQUEST*
|
|
320
320
|
"""
|
|
321
321
|
# retrieve the request arguments
|
|
322
|
-
args: dict[str, Any] = dict(request.args)
|
|
322
|
+
args: dict[str, Any] = dict(request.args) or {}
|
|
323
323
|
|
|
324
324
|
# log the request
|
|
325
325
|
if __IAM_LOGGER:
|
|
@@ -378,7 +378,7 @@ def service_exchange() -> Response:
|
|
|
378
378
|
:return: *Response* containing the reference user identification and the token, or *BAD REQUEST*
|
|
379
379
|
"""
|
|
380
380
|
# retrieve the request arguments
|
|
381
|
-
args: dict[str, Any] = dict(request.args)
|
|
381
|
+
args: dict[str, Any] = dict(request.args) or {}
|
|
382
382
|
|
|
383
383
|
# log the request
|
|
384
384
|
if __IAM_LOGGER:
|
|
@@ -446,7 +446,7 @@ def service_callback_exchange() -> Response:
|
|
|
446
446
|
result: Response | None = None
|
|
447
447
|
|
|
448
448
|
# retrieve the request arguments
|
|
449
|
-
args: dict[str, Any] = dict(request.args)
|
|
449
|
+
args: dict[str, Any] = dict(request.args) or {}
|
|
450
450
|
|
|
451
451
|
# log the request
|
|
452
452
|
if __IAM_LOGGER:
|
|
@@ -511,7 +511,7 @@ def service_get_token() -> Response:
|
|
|
511
511
|
:return: *Response* containing the user reference identification and the token, or *BAD REQUEST*
|
|
512
512
|
"""
|
|
513
513
|
# retrieve the request arguments
|
|
514
|
-
args: dict[str, Any] = dict(request.args)
|
|
514
|
+
args: dict[str, Any] = dict(request.args) or {}
|
|
515
515
|
|
|
516
516
|
# log the request
|
|
517
517
|
if __IAM_LOGGER:
|
|
@@ -562,7 +562,7 @@ def service_userinfo() -> Response:
|
|
|
562
562
|
:return: *Response* containing user data, or *BAD REQUEST*
|
|
563
563
|
"""
|
|
564
564
|
# retrieve the request arguments
|
|
565
|
-
args: dict[str, Any] = dict(request.args)
|
|
565
|
+
args: dict[str, Any] = dict(request.args) or {}
|
|
566
566
|
|
|
567
567
|
# log the request
|
|
568
568
|
if __IAM_LOGGER:
|
pypomes_iam/provider_pomes.py
CHANGED
|
@@ -122,9 +122,10 @@ def provider_setup_server(provider_id: str,
|
|
|
122
122
|
as key-value pairs in the body of the request. Otherwise, the external provider *provider_id* uses the standard
|
|
123
123
|
HTTP Basic Authorization scheme, wherein the credentials are B64-encoded and sent in the request headers.
|
|
124
124
|
|
|
125
|
-
Optional constant key-value pairs (such as ['Content-Type', 'application/x-www-form-urlencoded']),
|
|
126
|
-
added to the request headers, may be specified in *headers_data*. Likewise, optional constant
|
|
127
|
-
(such as ['grant_type', 'client_credentials']), to be added to the request body,
|
|
125
|
+
Optional constant key-value pairs (such as *['Content-Type', 'application/x-www-form-urlencoded']*),
|
|
126
|
+
to be added to the request headers, may be specified in *headers_data*. Likewise, optional constant
|
|
127
|
+
key-value pairs (such as *['grant_type', 'client_credentials']*), to be added to the request body,
|
|
128
|
+
may be specified in *body_data*.
|
|
128
129
|
|
|
129
130
|
:param provider_id: the provider's identification
|
|
130
131
|
:param user_id: the basic authorization user
|
|
@@ -222,14 +223,16 @@ def service_get_token() -> Response:
|
|
|
222
223
|
|
|
223
224
|
:return: *Response* containing the JWT token, or *BAD REQUEST*
|
|
224
225
|
"""
|
|
226
|
+
# retrieve the request arguments
|
|
227
|
+
args: dict[str, Any] = dict(request.args) or {}
|
|
228
|
+
|
|
225
229
|
# log the request
|
|
226
230
|
if __JWT_LOGGER:
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
__JWT_LOGGER.debug(msg=f"Request {request.method}:{request.path}, params {params}")
|
|
231
|
+
__JWT_LOGGER.debug(msg=f"Request {request.method}:{request.path}; {json.dumps(obj=args,
|
|
232
|
+
ensure_ascii=False)}")
|
|
230
233
|
|
|
231
234
|
# obtain the provider JWT
|
|
232
|
-
provider_id: str =
|
|
235
|
+
provider_id: str = args.get("jwt-provider")
|
|
233
236
|
|
|
234
237
|
# retrieve the token
|
|
235
238
|
token: str | None = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pypomes_iam
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.3
|
|
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
|
|
@@ -2,10 +2,10 @@ pypomes_iam/__init__.py,sha256=kkHvF3P79h21dNBmJ566Mp-L27oejhBcJa2VquyVsdg,1619
|
|
|
2
2
|
pypomes_iam/iam_actions.py,sha256=ORuHoiuMPnrMabvnCUcMeqHI4xfqbTErED1LydOPBCg,51191
|
|
3
3
|
pypomes_iam/iam_common.py,sha256=f8MGez9Eyia30FAXdNiHjeHnljnMQOOERr_BOxtoirY,17575
|
|
4
4
|
pypomes_iam/iam_pomes.py,sha256=VwqK3FoGj76SHKLARuBmIhziYnd_hoMWoUteMGRjuSc,8963
|
|
5
|
-
pypomes_iam/iam_services.py,sha256=
|
|
6
|
-
pypomes_iam/provider_pomes.py,sha256=
|
|
5
|
+
pypomes_iam/iam_services.py,sha256=_oAAk3y6iw_2gxDkbcNJDmj6Mk8HByhqX8fUT6Qg9kU,26865
|
|
6
|
+
pypomes_iam/provider_pomes.py,sha256=yude0n63gzArUP5IRFXnkBATHA0NMuQm7-vRIGZuzuc,17648
|
|
7
7
|
pypomes_iam/token_pomes.py,sha256=KiTlBNj3HURbZS_Rmti2RC6hny8VFPpbXeIO--HZ-fI,7703
|
|
8
|
-
pypomes_iam-0.8.
|
|
9
|
-
pypomes_iam-0.8.
|
|
10
|
-
pypomes_iam-0.8.
|
|
11
|
-
pypomes_iam-0.8.
|
|
8
|
+
pypomes_iam-0.8.3.dist-info/METADATA,sha256=zHhCJ6Xjcf6oGtdBU9nvDVbQo1xSGA0UIogdyqFwGFc,661
|
|
9
|
+
pypomes_iam-0.8.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
10
|
+
pypomes_iam-0.8.3.dist-info/licenses/LICENSE,sha256=YvUELgV8qvXlaYsy9hXG5EW3Bmsrkw-OJmmILZnonAc,1086
|
|
11
|
+
pypomes_iam-0.8.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|