Enum AccountRecovery

java.lang.Object
java.lang.Enum<AccountRecovery>
software.amazon.awscdk.services.cognito.AccountRecovery
All Implemented Interfaces:
Serializable, Comparable<AccountRecovery>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.841Z") @Stability(Stable) public enum AccountRecovery extends Enum<AccountRecovery>
How will a user be able to recover their account?

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();
 

See Also:
  • Enum Constant Details

    • EMAIL_AND_PHONE_WITHOUT_MFA

      @Stability(Stable) public static final AccountRecovery 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.
    • PHONE_WITHOUT_MFA_AND_EMAIL

      @Stability(Stable) public static final AccountRecovery 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.
    • EMAIL_ONLY

      @Stability(Stable) public static final AccountRecovery EMAIL_ONLY
      Email only.
    • PHONE_ONLY_WITHOUT_MFA

      @Stability(Stable) public static final AccountRecovery 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_AND_EMAIL

      @Stability(Stable) public static final AccountRecovery 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.
    • NONE

      @Stability(Stable) public static final AccountRecovery NONE
      None – users will have to contact an administrator to reset their passwords.
  • Method Details

    • values

      public static AccountRecovery[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static AccountRecovery valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null