Views
hypha.apply.users.views
¶
LoginView
¶
Bases: LoginView
form_list
class-attribute
instance-attribute
¶
form_list = (('auth', CustomAuthenticationForm), ('token', AuthenticationTokenForm), ('backup', BackupTokenForm))
get_context_data
¶
post
¶
Source code in hypha/apply/users/views.py
AccountView
¶
Bases: SuccessMessageMixin
, UpdateView
success_message
class-attribute
instance-attribute
¶
get_object
¶
get_form_kwargs
¶
form_valid
¶
Source code in hypha/apply/users/views.py
get_success_url
¶
get_context_data
¶
Source code in hypha/apply/users/views.py
EmailChangeDoneView
¶
EmailChangeConfirmationView
¶
Bases: TemplateView
get
¶
Source code in hypha/apply/users/views.py
unsigned
¶
Source code in hypha/apply/users/views.py
get_user
¶
Given the verified uid, look up and return the
corresponding user account if it exists, or None
if it
doesn't.
Source code in hypha/apply/users/views.py
ActivationView
¶
Bases: TemplateView
get
¶
Source code in hypha/apply/users/views.py
valid
¶
Verify that the activation token is valid and within the permitted activation time window.
Source code in hypha/apply/users/views.py
get_user
¶
Given the verified uid, look up and return the
corresponding user account if it exists, or None
if it
doesn't.
Source code in hypha/apply/users/views.py
PasswordResetView
¶
Bases: PasswordResetView
email_template_name
class-attribute
instance-attribute
¶
success_url
class-attribute
instance-attribute
¶
get_context_data
¶
get_extra_email_context
¶
Source code in hypha/apply/users/views.py
form_valid
¶
Overrides default django form_valid to pass extra context to send_email method
Source code in hypha/apply/users/views.py
TWOFASetupView
¶
Bases: SetupView
get_issuer
¶
get_context_data
¶
Source code in hypha/apply/users/views.py
TWOFADisableView
¶
Bases: ElevateMixin
, DisableView
View for disabling two-factor for a user's account.
template_name
class-attribute
instance-attribute
¶
TWOFAAdminDisableView
¶
BackupTokensView
¶
Bases: ElevateMixin
, BackupTokensView
PasswordResetConfirmView
¶
Bases: PasswordResetConfirmView
template_name
class-attribute
instance-attribute
¶
post_reset_login_backend
class-attribute
instance-attribute
¶
get_success_url
¶
get_context_data
¶
dispatch
¶
Source code in hypha/apply/users/views.py
PasswordLessLoginSignupView
¶
Bases: FormView
This view is used to collect the email address for passwordless login/signup.
If the email address is already associated with an account, an email is sent. If not, if the registration is enabled an email is sent, to allow the user to create an account.
NOTE: This view should never expose whether an email address is associated with an account.
template_name
class-attribute
instance-attribute
¶
get
¶
get_context_data
¶
Source code in hypha/apply/users/views.py
post
¶
Source code in hypha/apply/users/views.py
PasswordlessLoginView
¶
Bases: LoginView
This view is used to capture the passwordless login token and log the user in.
If the token is valid, the user is logged in and redirected to the dashboard. If the token is invalid, the user is shown invalid token page.
This view inherits from LoginView to reuse the 2FA views, if a mfa device is added to the user.
form_list
class-attribute
instance-attribute
¶
form_list = (('auth', CustomAuthenticationForm), ('token', AuthenticationTokenForm), ('backup', BackupTokenForm))
get_context_data
¶
post
¶
Source code in hypha/apply/users/views.py
get
¶
Source code in hypha/apply/users/views.py
PasswordlessSignupView
¶
Bases: TemplateView
This view is used to capture the passwordless login token and log the user in.
If the token is valid, the user is logged in and redirected to the dashboard. If the token is invalid, the user is shown invalid token page.
get
¶
Source code in hypha/apply/users/views.py
get_pending_signup
¶
Given the verified uid, look up and return the corresponding user
account if it exists, or None
if it doesn't.
Source code in hypha/apply/users/views.py
account_email_change
¶
Source code in hypha/apply/users/views.py
become
¶
Source code in hypha/apply/users/views.py
oauth
¶
create_password
¶
A custom view for the admin password change form used for account activation.
Source code in hypha/apply/users/views.py
mfa_failure_view
¶
Renders a template asking the user to setup 2FA.
Used by hypha.apply.users.middlewares.TwoFactorAuthenticationMiddleware, if ENFORCE_TWO_FACTOR is enabled.
Source code in hypha/apply/users/views.py
send_confirm_access_email_view
¶
Sends email with link to login in an elevated mode.
Source code in hypha/apply/users/views.py
elevate_check_code_view
¶
Checks if the code is correct and if so, elevates the user session.
Source code in hypha/apply/users/views.py
set_password_view
¶
Sends email with link to set password to user that doesn't have usable password.
This will the case when the user signed up using passwordless signup or using oauth.
Source code in hypha/apply/users/views.py
oauth_complete
¶
View utilized after an OAuth login is successful.
This is utilized to extend the OAuth session age to the SESSION_COOKIE_AGE_LONG
.
Parameters:
-
request
(HttpRequest
) –The request with a custom
backend
attribute that is populated by thesocial_django.utils.psa
decorator -
backend
(str
) –String containing the backend being utilized
Returns:
-
HttpResponseRedirect
–A
HttpResponseRedirect
to bring the user to a landing page or thenext
URL.