thunderbird_accounts.authentication.middleware

Classes

AccountsOIDCBackend(*args, **kwargs)

User authentication middleware for OIDC

SetHostIPInAllowedHostsMiddleware(get_response)

class thunderbird_accounts.authentication.middleware.AccountsOIDCBackend(*args, **kwargs)[source]

Bases: OIDCAuthenticationBackend

User authentication middleware for OIDC

This is our slightly customized mozilla-django-oidc middleware used to create/update/authenticate users against oidc flows.

get_user(user_id)[source]

Retrieve the user from OIDC get_user and additionally check if they’re active. Fixes https://github.com/mozilla/mozilla-django-oidc/issues/520

create_user(claims)[source]

Return object for a newly created user account.

update_user(user, claims)[source]

Update existing user with new claims, if necessary save, and return user

filter_users_by_claims(claims)[source]

Return all users matching the specified oidc_id.