arpakitlib 1.7.25__py3-none-any.whl → 1.7.26__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/ar_fastapi_util.py +12 -5
- {arpakitlib-1.7.25.dist-info → arpakitlib-1.7.26.dist-info}/METADATA +1 -1
- {arpakitlib-1.7.25.dist-info → arpakitlib-1.7.26.dist-info}/RECORD +7 -7
- {arpakitlib-1.7.25.dist-info → arpakitlib-1.7.26.dist-info}/LICENSE +0 -0
- {arpakitlib-1.7.25.dist-info → arpakitlib-1.7.26.dist-info}/NOTICE +0 -0
- {arpakitlib-1.7.25.dist-info → arpakitlib-1.7.26.dist-info}/WHEEL +0 -0
- {arpakitlib-1.7.25.dist-info → arpakitlib-1.7.26.dist-info}/entry_points.txt +0 -0
arpakitlib/ar_fastapi_util.py
CHANGED
@@ -454,7 +454,7 @@ def base_api_auth(
|
|
454
454
|
fastapi.security.HTTPBearer(auto_error=False)
|
455
455
|
),
|
456
456
|
api_key_string: str | None = Security(APIKeyHeader(name="apikey", auto_error=False)),
|
457
|
-
request:
|
457
|
+
request: starlette.requests.Request
|
458
458
|
) -> BaseAPIAuthData:
|
459
459
|
|
460
460
|
api_auth_data = BaseAPIAuthData(
|
@@ -528,13 +528,18 @@ def base_api_auth(
|
|
528
528
|
return func
|
529
529
|
|
530
530
|
|
531
|
+
class CheckAPIKeyAPIAuthData(BaseAPIAuthData):
|
532
|
+
require_check_api_key: bool = False
|
533
|
+
is_api_key_correct: bool | None = None
|
534
|
+
|
535
|
+
|
531
536
|
def api_auth_check_api_key(
|
532
537
|
*,
|
533
|
-
|
538
|
+
require_check_api_key: bool = True,
|
534
539
|
check_api_key_func: Callable | None = None,
|
535
540
|
correct_api_key: str | None = None
|
536
541
|
):
|
537
|
-
if
|
542
|
+
if require_check_api_key:
|
538
543
|
require_api_key_string = True
|
539
544
|
else:
|
540
545
|
require_api_key_string = False
|
@@ -549,9 +554,11 @@ def api_auth_check_api_key(
|
|
549
554
|
require_token_string=False
|
550
555
|
)),
|
551
556
|
transmitted_api_data: BaseTransmittedAPIData = Depends(get_transmitted_api_data),
|
552
|
-
request:
|
557
|
+
request: starlette.requests.Request
|
553
558
|
):
|
554
|
-
|
559
|
+
if not require_check_api_key:
|
560
|
+
return # TODO
|
561
|
+
# TODO
|
555
562
|
|
556
563
|
return func
|
557
564
|
|
@@ -133,7 +133,7 @@ arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css,sha256=jzPZlgJTFwSdSphk9C
|
|
133
133
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css.map,sha256=5wq8eXMLU6Zxb45orZPL1zAsBFJReFw6GjYqGpUX3hg,262650
|
134
134
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js,sha256=ffrLZHHEQ_g84A-ul3yWa10Kk09waOAxHcQXPuZuavg,339292
|
135
135
|
arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js.map,sha256=9UhIW7MqCOZPAz1Sl1IKfZUuhWU0p-LJqrnjjJD9Xhc,1159454
|
136
|
-
arpakitlib/ar_fastapi_util.py,sha256=
|
136
|
+
arpakitlib/ar_fastapi_util.py,sha256=PrGTPwC9OzFbDOEWs7_X9ZsQ_legE3tZ9IlhPsOYELc,23321
|
137
137
|
arpakitlib/ar_file_storage_in_dir_util.py,sha256=D3e3rGuHoI6xqAA5mVvEpVVpOWY1jyjNsjj2UhyHRbE,3674
|
138
138
|
arpakitlib/ar_file_util.py,sha256=XiwmeycxoLqtYnGOu5q6IEaJJXilZvtLvsKDKtwqSLY,137
|
139
139
|
arpakitlib/ar_hash_util.py,sha256=Iqy6KBAOLBQMFLWv676boI5sV7atT2B-fb7aCdHOmIQ,340
|
@@ -162,9 +162,9 @@ arpakitlib/ar_str_util.py,sha256=oCEtQ_TTn35OEz9jCNLjbhopq76JmaifD_iYR-nEJJ4,214
|
|
162
162
|
arpakitlib/ar_type_util.py,sha256=GNc9PgFKonj5lRlAHSnVPBN5nLIslrG8GTiZHjkf05w,2138
|
163
163
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=sh4fcUkAkdOetFn9JYoTvjcSXP-M1wU04KEY-ECLfLg,5137
|
164
164
|
arpakitlib/ar_zabbix_api_client_util.py,sha256=Q-VR4MvoZ9aHwZeYZr9G3LwN-ANx1T5KFmF6pvPM-9M,6402
|
165
|
-
arpakitlib-1.7.
|
166
|
-
arpakitlib-1.7.
|
167
|
-
arpakitlib-1.7.
|
168
|
-
arpakitlib-1.7.
|
169
|
-
arpakitlib-1.7.
|
170
|
-
arpakitlib-1.7.
|
165
|
+
arpakitlib-1.7.26.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
166
|
+
arpakitlib-1.7.26.dist-info/METADATA,sha256=1yIKkmYFSiBBRQlC4OBymOt9r000Onr59QUMHQrnZNs,2824
|
167
|
+
arpakitlib-1.7.26.dist-info/NOTICE,sha256=95aUzaPJjVpDsGAsNzVnq7tHTxAl0s5UFznCTkVCau4,763
|
168
|
+
arpakitlib-1.7.26.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
169
|
+
arpakitlib-1.7.26.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
170
|
+
arpakitlib-1.7.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|