API_AUTHENTICATE
Optional
|
API_AUTHENTICATE_METHOD
Optional
|
API_ROLE_MAP
default: None
type dict | list[str] | str
Optional Global/Model
Config-driven roles for endpoints. Keys may be HTTP methods (GET, POST, PATCH, DELETE),
GET_MANY/GET_ONE for GET granularity, RELATION_GET for relation routes, or ALL/* as a fallback.
Values can be a list/str of roles (all required) or a dict {"roles": [..], "any_of": True}.
Example:
API_ROLE_MAP = {
"GET": ["viewer"],
"POST": {"roles": ["editor", "admin"], "any_of": True},
"DELETE": ["admin"],
}
|
API_ROLES_REQUIRED
default: None
type list[str]
Optional Global/Model
|
API_ROLES_ACCEPTED
default: None
type list[str]
Optional Global/Model
|
API_CREDENTIAL_HASH_FIELD
default: None
type str
Optional Global
|
API_CREDENTIAL_CHECK_METHOD
default: None
type str
Optional Global
|
API_KEY_AUTH_AND_RETURN_METHOD
default: None
type callable
Optional Global
|
API_USER_LOOKUP_FIELD
default: None
type str
Optional Global
|
API_CUSTOM_AUTH
default: None
type callable
Optional Global
|
|
API_AUTH_ME_ROUTE
default: /auth/me
type str
Optional Global
Path for the current-user endpoint that returns the authenticated user
as JSON. Applies when a user model is configured and any supported
authentication method is enabled (jwt, basic, api_key, or
custom). Example: set to /api/auth/me to expose the endpoint
under the API prefix.
|
API_EXPOSE_ME
default: True
type bool
Optional Global
|
API_JWT_EXPIRY_TIME
default: 360
type int
Optional Global
|
API_JWT_ALGORITHM
default: HS256
type str
Optional Global
|
API_JWT_ALLOWED_ALGORITHMS
default: None
type str | list[str]
Optional Global
|
API_JWT_LEEWAY
default: 0
type int
Optional Global
|
API_JWT_ISSUER
default: None
type str
Optional Global
|
API_JWT_AUDIENCE
default: None
type str
Optional Global
|
API_JWT_REFRESH_EXPIRY_TIME
default: 2880
type int
Optional Global
|
ACCESS_SECRET_KEY
default: None
type str
Required for HS* Global
|
REFRESH_SECRET_KEY
default: None
type str
Required for HS* Global
|
ACCESS_PRIVATE_KEY
default: None
type str
Required for RS* Global
|
ACCESS_PUBLIC_KEY
default: None
type str
Required for RS* Global
|
REFRESH_PRIVATE_KEY
default: None
type str
Required for RS* Global
|
REFRESH_PUBLIC_KEY
default: None
type str
Required for RS* Global
|