Package eu.webtoolkit.jwt.auth
Enum Class LoginState
- All Implemented Interfaces:
Serializable
,Comparable<LoginState>
,Constable
Enumeration for a login state.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe identified user was refused to login.No user is currently identified.Requires multiple factors in the authentication process.A user is strongly authenticated.A user is weakly authenticated. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Returns the numerical representation of this enum.static LoginState
Returns the enum constant of this class with the specified name.static LoginState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LoggedOut
No user is currently identified. -
Disabled
The identified user was refused to login.This is caused by for example
User.getStatus()
returningDisabled
, or if email verification is required but the email hasn't been verified yet. -
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
A user is strongly authenticated. -
RequiresMfa
Requires multiple factors in the authentication process.After logging in through a primary method, like password, or if the authentication was remembered through a cookie, the user will be prompted with an additional authentication request.
Using JWt's default implementation, this will ask for the TOTP code.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
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.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public int getValue()Returns the numerical representation of this enum.
-