A collection of classes to deal with accounts for different parties on a system.
Run ‘reahl componentinfo reahl-domain’ for information on configuration.
- class reahl.domain.systemaccountmodel.AccountManagementInterface(**kwargs)¶
A session scoped object that exposes a number of Fields and Events that user interface Widgets can use to access the functionality of this module.
Obtain an instance of AccountManagementInterface using AccountManagementInterface.for_current_session().
email: For input of any email address for use by Events.
new_email: For choosing a new email address (see events.change_email_event)
password: For typing a password for use by several Events.
repeat_password: For confirming a that fields.password was typed correctly.
stay_logged_in: Used when logging in to indicate that the user wishes to stay logged in for longer before the login times out.
secret: The secret key sent via email to verify the user’s identity.
accept_terms: Used when registering to indicate whether the user accepts the terms of the application.
verify_event = Ask the system to verify the fields.email address entered.
register_event = Register a new account.
change_email_event = Requests a given email address to be changed.
investigate_event = Investigates whether a given email address is registered.
choose_password_event = Selects a new password given in fields.new_password (fields.secret should also be supplied).
reset_password_event = Requests that a password change be initiated (this will send a secret key to the current registered email).
login_event = Logs into the system using fields.email and fields.password
resend_event = Resends a secret of an outstanding request (to fields.email).
log_out_event = Logs out the current account.
- class reahl.domain.systemaccountmodel.LoginSession(**kwargs)¶
A @session_scoped object that keeps track of logged in access to the system.
AccountManagementInterfacefor logging users into and out of the system.)
New in version 3.1.
The SystemAccount currently logged on
Answers whether the user is logged in.
secured – If True, ensures the login is done via secure means (such as an encrypted connection).
Changed in version 3.1: Moved here from the older UserSession, and the secured keyword argument was added.
- class reahl.domain.systemaccountmodel.SystemAccount(**kwargs)¶
The credentials for someone to be able to log into the system.
The party to whom this account belongs.
The date when this account was first registered.
Whether this account is enabled or not
The number of failed login attempts using this account.
- exception reahl.domain.systemaccountmodel.PasswordException(commit=False, message=None, detail_messages=, handled_inline=True, json_string=None)¶
Whenever a new password is chosen, it is input by a user into two separate fields to guard against typing errors. PasswordException is raised to indicate that the two PasswordFields do not match.
- exception reahl.domain.systemaccountmodel.InvalidPasswordException(commit=False, message=None, detail_messages=, handled_inline=True, json_string=None)¶
Raised to indicate that a user supplied incorrect password or username.
- exception reahl.domain.systemaccountmodel.KeyException(commit=False, message=None, detail_messages=, handled_inline=True, json_string=None)¶
Raised to indicate that the secret key given is not valid.
- exception reahl.domain.systemaccountmodel.InvalidEmailException(commit=False, message=None, detail_messages=, handled_inline=True, json_string=None)¶
Raised to indicate that the given email address is not valid.
- exception reahl.domain.systemaccountmodel.NoSuchAccountException(commit=False, message=None, detail_messages=, handled_inline=True, json_string=None)¶
Raised to indicate that the account relating to a supplied email address does not exist.
- exception reahl.domain.systemaccountmodel.NotUniqueException(commit=False, message=None, detail_messages=, handled_inline=True, json_string=None)¶
Raised to indicate that an email address supplied for a new registration already is in use on the system.
- exception reahl.domain.systemaccountmodel.AccountNotActiveException(account_status)¶
Raised to indicate that the account related to the given email address is not active yet.