@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:57.225Z") public enum AccountRecovery extends java.lang.Enum<AccountRecovery>
When a user forgets their password, they can have a code sent to their verified email or verified phone to recover their account. You can choose the preferred way to send codes below. We recommend not allowing phone to be used for both password resets and multi-factor authentication (MFA).
Example:
UserPool.Builder.create(this, "UserPool") // ... .accountRecovery(AccountRecovery.EMAIL_ONLY) .build();
Enum Constant and Description |
---|
EMAIL_AND_PHONE_WITHOUT_MFA
Email if available, otherwise phone, but don’t allow a user to reset their password via phone if they are also using it for MFA.
|
EMAIL_ONLY
Email only.
|
NONE
None – users will have to contact an administrator to reset their passwords.
|
PHONE_AND_EMAIL
(Not Recommended) Phone if available, otherwise email, and do allow a user to reset their password via phone if they are also using it for MFA.
|
PHONE_ONLY_WITHOUT_MFA
Phone only, but don’t allow a user to reset their password via phone if they are also using it for MFA.
|
PHONE_WITHOUT_MFA_AND_EMAIL
Phone if available, otherwise email, but don’t allow a user to reset their password via phone if they are also using it for MFA.
|
Modifier and Type | Method and Description |
---|---|
static AccountRecovery |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AccountRecovery[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AccountRecovery EMAIL_AND_PHONE_WITHOUT_MFA
public static final AccountRecovery PHONE_WITHOUT_MFA_AND_EMAIL
public static final AccountRecovery EMAIL_ONLY
public static final AccountRecovery PHONE_ONLY_WITHOUT_MFA
public static final AccountRecovery PHONE_AND_EMAIL
public static final AccountRecovery NONE
public static AccountRecovery[] values()
for (AccountRecovery c : AccountRecovery.values()) System.out.println(c);
public static AccountRecovery valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null