thunderbird_accounts.authentication.rest_authentication

Django REST Framework authentication classes.

Classes

ActiveUserOIDCAuthentication([backend])

Bearer-token authentication that also refuses deactivated users.

class thunderbird_accounts.authentication.rest_authentication.ActiveUserOIDCAuthentication(backend=None)[source]

Bases: OIDCAuthentication

Bearer-token authentication that also refuses deactivated users.

The upstream class resolves the token to a local user without checking is_active; the session backend’s get_user does check it, so this keeps the two entry points consistent.

authenticate(request)[source]

Authenticate the request and return a tuple of (user, token) or None if there was no authentication attempt.