qunicorn_core.api.jwt module

Module containing JWT security features for the API.

class qunicorn_core.api.jwt.JWTMixin

Bases: object

Extend Blueprint to add security documentation and jwt handling

require_jwt(security_scheme: str | Dict[str, List[Any]] = 'jwt', optional: bool = False) Callable[[Callable[[...], RT]], Callable[[...], RT]]

Decorator validating jwt tokens and documenting them for openapi specification (only version 3…).

qunicorn_core.api.jwt.JWT_SCHEME = {'bearerFormat': 'JWT', 'description': 'The jwt access token as returned by login or refresh.', 'scheme': 'bearer', 'type': 'http'}

Security schemes to be added to the swagger.json api documentation.