fastapi_auth_jwt
This module provides FastAPI dependencies for JWT bearer token authentication in Odoo applications.
Key Features
- authentication: Provides a dependency that returns the authenticated JWT payload, raising a 401 error if absent or invalid.
- authentication: Provides a dependency that returns the authenticated JWT payload or None if authorization is absent, raising a 401 error if present and invalid.
- authentication: Provides a dependency that obtains the authenticated partner from the JWT token according to the validator's partner strategy, raising a 401 error if undetermined.
- authentication: Provides a dependency that returns the authenticated partner or an empty recordset for the public user if authorization is absent or partner not required.
- authentication: Provides a dependency that returns an Odoo environment using the user from the JWT validator's user strategy, raising a 401 error if unauthenticated.
- authentication: Provides a dependency that returns the name of the default JWT validator, defaulting to None for single validator setups.
- authentication: Provides a dependency that returns the credentials from the Authorization header, defaulting to None if absent.