JWT Cookie Security Scheme¶
- class JWTCookieSecurity(authentication_token: str, scheme_name: str | None = None, *, auto_error: bool = True)[source]¶
Bases:
SecurityBaseFastAPI security scheme for identifying a JWT authentication token.
Defines how the token should be extracted from the request (via the __call__ method) and provides metadata for OpenAPI documentation.
—
Public Instances¶
The following instances of app.lib.auth.JWTCookieSecurity are exported for use as FastAPI dependencies:
- app.lib.auth.access_token = JWTCookieSecurity(authentication_token="access_token")¶
- app.lib.auth.refresh_token = JWTCookieSecurity(authentication_token="refresh_token")¶