summaryrefslogtreecommitdiff
path: root/venv/lib/python3.11/site-packages/litestar/openapi/spec/security_requirement.py
diff options
context:
space:
mode:
authorcyfraeviolae <cyfraeviolae>2024-04-03 03:10:44 -0400
committercyfraeviolae <cyfraeviolae>2024-04-03 03:10:44 -0400
commit6d7ba58f880be618ade07f8ea080fe8c4bf8a896 (patch)
treeb1c931051ffcebd2bd9d61d98d6233ffa289bbce /venv/lib/python3.11/site-packages/litestar/openapi/spec/security_requirement.py
parent4f884c9abc32990b4061a1bb6997b4b37e58ea0b (diff)
venv
Diffstat (limited to 'venv/lib/python3.11/site-packages/litestar/openapi/spec/security_requirement.py')
-rw-r--r--venv/lib/python3.11/site-packages/litestar/openapi/spec/security_requirement.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/venv/lib/python3.11/site-packages/litestar/openapi/spec/security_requirement.py b/venv/lib/python3.11/site-packages/litestar/openapi/spec/security_requirement.py
new file mode 100644
index 0000000..e3d1394
--- /dev/null
+++ b/venv/lib/python3.11/site-packages/litestar/openapi/spec/security_requirement.py
@@ -0,0 +1,30 @@
+from __future__ import annotations
+
+from typing import Dict, List
+
+SecurityRequirement = Dict[str, List[str]]
+"""Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a
+security scheme declared in the.
+
+`Security Schemes <https://spec.openapis.org/oas/v3.1.0#componentsSecuritySchemes>`_ under the
+`Components Object <https://spec.openapis.org/oas/v3.1.0#componentsObject>`_.
+
+Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to
+be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey
+security information.
+
+When a list of Security Requirement Objects is defined on the
+`OpenAPI Object <https://spec.openapis.org/oas/v3.1.0#oasObject>`_ or
+`Operation Object <https://spec.openapis.org/oas/v3.1.0#operationObject>`_, only one of the Security Requirement
+Objects in the list needs to be satisfied to authorize the request.
+
+Patterned Fields
+
+{name}: ``List[str]``
+Each name MUST correspond to a security scheme which is declared
+in the `Security Schemes <https://spec.openapis.org/oas/v3.1.0#componentsSecuritySchemes>`_ under the
+`Components Object <https://spec.openapis.org/oas/v3.1.0#componentsObject>`_. if the security scheme is of type
+``"oauth2"`` or ``"openIdConnect"``, then the value is a list of scope names required for the execution, and the list
+MAY be empty if authorization does not require a specified scope. For other security scheme types, the array MAY contain
+a list of role names which are required for the execution,but are not otherwise defined or exchanged in-band.
+"""