password reset

jwt_allauth.password_reset.serializers module

class jwt_allauth.password_reset.serializers.PasswordResetSerializer(*args, **kwargs)[source]

Bases: Serializer

Serializer for requesting a password reset e-mail.

get_email_options()[source]

Override this method to change default e-mail options

password_reset_form_class

alias of PasswordResetForm

save()[source]
validate_email(value)[source]
class jwt_allauth.password_reset.serializers.SetPasswordSerializer(*args, **kwargs)[source]

Bases: PasswordChangeSerializer

old_password = None
validate_old_password(value)[source]

jwt_allauth.password_reset.views module

class jwt_allauth.password_reset.views.DefaultPasswordResetView(**kwargs)[source]

Bases: GenericAPIView

Default view for password reset form.

get(request)[source]
permission_classes = (<class 'rest_framework.permissions.AllowAny'>,)
template_name = 'password/reset.html'
class jwt_allauth.password_reset.views.DefaultSetPasswordView(**kwargs)[source]

Bases: GenericAPIView

Default view for admin-managed registration password set form.

This renders a minimal HTML UI that posts to the API-based SetPasswordView (rest_set_password) and relies on the SET_PASSWORD_COOKIE for authorization.

get(request)[source]
permission_classes = (<class 'rest_framework.permissions.AllowAny'>,)
template_name = 'password/set.html'
class jwt_allauth.password_reset.views.PasswordResetConfirmView(**kwargs)[source]

Bases: GenericAPIView

form_url = 'password_reset/'
get(request, *args, **kwargs)
static get_user(uidb64)[source]
class jwt_allauth.password_reset.views.PasswordResetView(**kwargs)[source]

Bases: GenericAPIView

Calls Django Auth PasswordResetForm save method.

Accepts the following POST parameters: email Returns the success/fail message.

permission_classes = (<class 'rest_framework.permissions.AllowAny'>,)
post(request, *args, **kwargs)
serializer_class

alias of PasswordResetSerializer

throttle_classes = [<class 'rest_framework.throttling.AnonRateThrottle'>]
class jwt_allauth.password_reset.views.ResetPasswordView(**kwargs)[source]

Bases: GenericAPIView

Calls Django Auth SetPasswordForm save method.

Accepts the following POST parameters: new_password1, new_password2 Returns the success/fail message.

dispatch(*args, **kwargs)[source]

.dispatch() is pretty much the same as Django’s regular dispatch, but with extra hooks for startup, finalize, and exception handling.

permission_classes = (<class 'jwt_allauth.password_reset.permissions.ResetPasswordPermission'>,)
post(request)[source]
serializer_class

alias of SetPasswordSerializer

throttle_classes = [<class 'rest_framework.throttling.UserRateThrottle'>]
class jwt_allauth.password_reset.views.SetPasswordView(**kwargs)[source]

Bases: GenericAPIView

Set password for admin-managed registration. Accepts: new_password1, new_password2 Returns: tokens and success message.

dispatch(*args, **kwargs)[source]

.dispatch() is pretty much the same as Django’s regular dispatch, but with extra hooks for startup, finalize, and exception handling.

permission_classes = (<class 'jwt_allauth.password_reset.permissions.SetPasswordPermission'>,)
post(request)[source]
serializer_class

alias of SetPasswordSerializer

throttle_classes = [<class 'rest_framework.throttling.UserRateThrottle'>]
jwt_allauth.password_reset.views.get_mfa_totp_mode() str[source]

Return the current MFA TOTP mode from settings.

This must be evaluated at call time (not import time) so that Django’s override_settings used in tests – and any runtime changes – are respected.