gws.plugin.account.account_action¶
Action for the account onboarding procedure.
Source code: gws.plugin.account.account_action
Module Contents¶
- class gws.plugin.account.account_action.Config¶
Bases:
gws.base.action.ConfigAccount management for end users, including onboarding.
- class gws.plugin.account.account_action.MfaProps(*args, **kwargs)¶
Bases:
gws.DataMFA method offered to the user during onboarding.
- class gws.plugin.account.account_action.Object¶
Bases:
gws.base.action.ObjectAccount action, provides the onboarding API for the client.
The onboarding steps are: start, set the password, select an MFA method (only if MFA methods are configured). Each step requires the temporary code returned by the previous step, the first one the code from the onboarding link.
- h: gws.plugin.account.helper.Object¶
The account helper.
- configure()¶
- get_account_by_tc(tc, category, expected_status)¶
Find an account by a temporary code.
The code is invalidated.
- Parameters:
tc – Temporary code.
category – Expected code category.
expected_status – Expected account status.
- Returns:
The account record.
- Raises:
gws.ForbiddenError – If no valid account is found.
- mfa_props(account: dict, mfa_secret)¶
Create props for the MFA methods available to an account.
- Parameters:
account – Account record.
mfa_secret – MFA secret for the QR codes.
- Returns:
A list of
MfaProps.
- onboarding_save_mfa(req: gws.WebRequester, p: OnboardingSaveMfaRequest) OnboardingSaveMfaResponse¶
Save the selected MFA method and activate the account.
- onboarding_save_password(req: gws.WebRequester, p: OnboardingSavePasswordRequest) OnboardingSavePasswordResponse¶
Set the password of the account.
- onboarding_start(req: gws.WebRequester, p: OnboardingStartRequest) OnboardingStartResponse¶
Start the account onboarding.
- class gws.plugin.account.account_action.OnboardingSaveMfaRequest(*args, **kwargs)¶
Bases:
gws.RequestRequest to select an MFA method during onboarding.
- class gws.plugin.account.account_action.OnboardingSaveMfaResponse(*args, **kwargs)¶
Bases:
gws.ResponseResponse to selecting an MFA method.
- class gws.plugin.account.account_action.OnboardingSavePasswordRequest(*args, **kwargs)¶
Bases:
gws.RequestRequest to set the password during onboarding.
- class gws.plugin.account.account_action.OnboardingSavePasswordResponse(*args, **kwargs)¶
Bases:
gws.ResponseResponse to setting the password.
- class gws.plugin.account.account_action.OnboardingStartRequest(*args, **kwargs)¶
Bases:
gws.RequestRequest to start the onboarding.
- class gws.plugin.account.account_action.OnboardingStartResponse(*args, **kwargs)¶
Bases:
gws.ResponseResponse to the onboarding start.
- class gws.plugin.account.account_action.Props¶
Bases:
gws.base.action.Props