thunderbird_accounts.authentication.api

Functions

can_i_sign_up(request, *args, **kwargs)

This is a temporary fix until we switch off Mailchimp automated emails...

confirm_totp_setup(request, *args, **kwargs)

create_test_allow_list_entry(request, *args, ...)

If the user has the permission's defined in CanCreateTestAllowListEntries they can programmatically add an allow list entry that's marked as a is_test_entry=True

get_mfa_methods(request, *args, **kwargs)

get_user_profile(request, *args, **kwargs)

get_waffle_flags(request, *args, **kwargs)

Return the caller's active waffle flags, switches, and samples.

regenerate_recovery_codes(request, *args, ...)

remove_recovery_codes_credential(request, ...)

remove_totp_credential(request, *args, **kwargs)

sign_up(request, *args, **kwargs)

The api endpoint for signing up a new user.

start_totp_setup(request, *args, **kwargs)

Classes

CanISignUpResponses(*values)

CanISignUpThrottle()

RecoveryCodesRegenerateThrottle()

SignUpThrottle()

TotpConfirmThrottle()

class thunderbird_accounts.authentication.api.SignUpThrottle[source]

Bases: UserRateThrottle

class thunderbird_accounts.authentication.api.CanISignUpThrottle[source]

Bases: UserRateThrottle

class thunderbird_accounts.authentication.api.CanISignUpResponses(*values)[source]

Bases: StrEnum

class thunderbird_accounts.authentication.api.TotpConfirmThrottle[source]

Bases: UserRateThrottle

class thunderbird_accounts.authentication.api.RecoveryCodesRegenerateThrottle[source]

Bases: UserRateThrottle

thunderbird_accounts.authentication.api.get_waffle_flags(request, *args, **kwargs)

Return the caller’s active waffle flags, switches, and samples.

Callers authenticate with Authorization: Bearer <keycloak-access-token> and we resolve that to the matching local user via OIDCAuthentication. This is just waffle’s own waffle_json view wrapped with our token auth.

thunderbird_accounts.authentication.api.create_test_allow_list_entry(request, *args, **kwargs)

If the user has the permission’s defined in CanCreateTestAllowListEntries they can programmatically add an allow list entry that’s marked as a is_test_entry=True

thunderbird_accounts.authentication.api.can_i_sign_up(request, *args, **kwargs)

This is a temporary fix until we switch off Mailchimp automated emails…

thunderbird_accounts.authentication.api.sign_up(request, *args, **kwargs)

The api endpoint for signing up a new user.

We create the Keycloak user and attach its uuid to the local Account’s user object. We only create the local Accounts user object if the Keycloak user object was successfully created.