arpakitlib 1.8.14__py3-none-any.whl → 1.8.15__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.
- arpakitlib/_arpakit_project_template_v_2/project/api/auth.py +4 -4
- {arpakitlib-1.8.14.dist-info → arpakitlib-1.8.15.dist-info}/METADATA +1 -1
- {arpakitlib-1.8.14.dist-info → arpakitlib-1.8.15.dist-info}/RECORD +6 -6
- {arpakitlib-1.8.14.dist-info → arpakitlib-1.8.15.dist-info}/LICENSE +0 -0
- {arpakitlib-1.8.14.dist-info → arpakitlib-1.8.15.dist-info}/WHEEL +0 -0
- {arpakitlib-1.8.14.dist-info → arpakitlib-1.8.15.dist-info}/entry_points.txt +0 -0
@@ -33,7 +33,7 @@ class APIAuthData(BaseModel):
|
|
33
33
|
user_token_string: str | None = None
|
34
34
|
api_key_string: str | None = None
|
35
35
|
|
36
|
-
|
36
|
+
is_user_token_correct: bool | None = None
|
37
37
|
is_api_key_correct: bool | None = None
|
38
38
|
|
39
39
|
|
@@ -207,12 +207,12 @@ def api_auth(
|
|
207
207
|
|
208
208
|
if validate_user_token_func is not None:
|
209
209
|
if is_async_callable(validate_user_token_func):
|
210
|
-
api_auth_data.
|
210
|
+
api_auth_data.is_user_token_correct = await validate_user_token_func(
|
211
211
|
api_auth_data=api_auth_data,
|
212
212
|
request=request
|
213
213
|
)
|
214
214
|
elif is_sync_function(validate_user_token_func):
|
215
|
-
api_auth_data.
|
215
|
+
api_auth_data.is_user_token_correct = validate_user_token_func()
|
216
216
|
else:
|
217
217
|
raise TypeError("unknown validate_token_func type")
|
218
218
|
|
@@ -230,7 +230,7 @@ def api_auth(
|
|
230
230
|
# require_correct_token
|
231
231
|
|
232
232
|
if require_correct_user_token:
|
233
|
-
if not api_auth_data.
|
233
|
+
if not api_auth_data.is_user_token_correct:
|
234
234
|
raise APIException(
|
235
235
|
status_code=fastapi.status.HTTP_401_UNAUTHORIZED,
|
236
236
|
error_code=APIErrorCodes.cannot_authorize,
|
@@ -71,7 +71,7 @@ arpakitlib/_arpakit_project_template_v_2/project/additional_model/__init__.py,sh
|
|
71
71
|
arpakitlib/_arpakit_project_template_v_2/project/additional_model/common.py,sha256=dcvj5C9E2F2KCsGZPBBncQf_EvVJAC1qQgnyD8P4ZEw,6
|
72
72
|
arpakitlib/_arpakit_project_template_v_2/project/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
73
73
|
arpakitlib/_arpakit_project_template_v_2/project/api/asgi.py,sha256=ES3YGwNxWUHVyD6e2ii6QkvTyB-vlVmr8_PhfVIXQ4Y,78
|
74
|
-
arpakitlib/_arpakit_project_template_v_2/project/api/auth.py,sha256=
|
74
|
+
arpakitlib/_arpakit_project_template_v_2/project/api/auth.py,sha256=L2i5dDfmuCPIrfr2iMZIQ6ecQgeA2IAaNUXS1ykf2LU,11418
|
75
75
|
arpakitlib/_arpakit_project_template_v_2/project/api/const.py,sha256=J9bqaRRiIc3RLn6SJTvdfDvFrSsM_Ixii9t2M8dA5Jc,433
|
76
76
|
arpakitlib/_arpakit_project_template_v_2/project/api/create_api_app.py,sha256=3jdYXS0unrXYc6XGy6b8RPCoqC6iWNq7tRrAc6lhVd4,2268
|
77
77
|
arpakitlib/_arpakit_project_template_v_2/project/api/event.py,sha256=OwY9ECruH5tWHA4748irsjRIYA8zHfNjskP25lOYt5Q,2414
|
@@ -258,8 +258,8 @@ arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,40
|
|
258
258
|
arpakitlib/ar_wata_api_client.py,sha256=gdHOqDbuqxhTjVDtRW1DvkRJLdDofCrOq51GTctzLns,242
|
259
259
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
|
260
260
|
arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
|
261
|
-
arpakitlib-1.8.
|
262
|
-
arpakitlib-1.8.
|
263
|
-
arpakitlib-1.8.
|
264
|
-
arpakitlib-1.8.
|
265
|
-
arpakitlib-1.8.
|
261
|
+
arpakitlib-1.8.15.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
262
|
+
arpakitlib-1.8.15.dist-info/METADATA,sha256=LC4NiadY9ZuMD9HhME2g_gzOsavI8Xcvy3QXK6CVInY,3358
|
263
|
+
arpakitlib-1.8.15.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
264
|
+
arpakitlib-1.8.15.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
265
|
+
arpakitlib-1.8.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|