Enum Class LoginState

All Implemented Interfaces:
Serializable, Comparable<LoginState>, Constable

public enum LoginState extends Enum<LoginState>
Enumeration for a login state.

See Also:
  • Enum Constant Details

    • LoggedOut

      public static final LoginState LoggedOut
      No user is currently identified.
    • Disabled

      public static final LoginState Disabled
      The identified user was refused to login.

      This is caused by for example User.getStatus() returning Disabled, or if email verification is required but the email hasn't been verified yet.

    • Weak

      public static final LoginState Weak
      A user is weakly authenticated.

      The authentication method was weak, typically this means that a secondary authentication system was used (e.g. an authentication cookie) instead of a primary mechanism (like a password).

      You may want to allow certain operations, but request to authenticate fully before more sensitive operations.

    • Strong

      public static final LoginState Strong
      A user is strongly authenticated.
  • Method Details

    • values

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

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

      public int getValue()
      Returns the numerical representation of this enum.