Enum JWTAuthenticationHandler.JWTAuthState
- java.lang.Object
-
- java.lang.Enum<JWTAuthenticationHandler.JWTAuthState>
-
- com.jalios.jcms.authentication.handlers.JWTAuthenticationHandler.JWTAuthState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JWTAuthenticationHandler.JWTAuthState>
- Enclosing class:
- JWTAuthenticationHandler
public static enum JWTAuthenticationHandler.JWTAuthState extends java.lang.Enum<JWTAuthenticationHandler.JWTAuthState>
Possible JWT authentication state after handler invocation. AuthenticationContext may cumulate several states.- Since:
- jcms-10.0.8 / JCMS-7956
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAILED_INVALID_JWT
A JWT was received but is invalid.FAILED_INVALID_JWT_INVALID_HTTP_METHOD
A JWT was received but it does not authorize the HTTP method that was used.FAILED_INVALID_JWT_INVALID_IP
A JWT was received but it cannot be used from the IP it was sent from.FAILED_INVALID_JWT_INVALID_MEMBER
A JWT was received but its Member was invalid.FAILED_INVALID_JWT_INVALID_URL
A JWT was received but it was used for an unauthorized URL.FAILED_JWT_NOT_IN_DB
A JWT was received but it could not be found in database.LOGGED_WITH_JWT
A JWT was received, was validated and was used to set the loggedMember.SKIPPED_ALREADY_LOGGED
Member is already logged in current context, JWT authentication auth was skipped for current request.SKIPPED_DISABLED
JWT Authentication is disabled and was skipped for current request.SKIPPED_NO_JWT
No JWT token was received, JWT authentication was skipped for current request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSet(AuthenticationContext ctxt)
Check if this state was set for the specified AuthenticationContextstatic JWTAuthenticationHandler.JWTAuthState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JWTAuthenticationHandler.JWTAuthState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SKIPPED_DISABLED
public static final JWTAuthenticationHandler.JWTAuthState SKIPPED_DISABLED
JWT Authentication is disabled and was skipped for current request.
-
SKIPPED_ALREADY_LOGGED
public static final JWTAuthenticationHandler.JWTAuthState SKIPPED_ALREADY_LOGGED
Member is already logged in current context, JWT authentication auth was skipped for current request.
-
SKIPPED_NO_JWT
public static final JWTAuthenticationHandler.JWTAuthState SKIPPED_NO_JWT
No JWT token was received, JWT authentication was skipped for current request.
-
LOGGED_WITH_JWT
public static final JWTAuthenticationHandler.JWTAuthState LOGGED_WITH_JWT
A JWT was received, was validated and was used to set the loggedMember.
-
FAILED_INVALID_JWT
public static final JWTAuthenticationHandler.JWTAuthState FAILED_INVALID_JWT
A JWT was received but is invalid.
-
FAILED_INVALID_JWT_INVALID_MEMBER
public static final JWTAuthenticationHandler.JWTAuthState FAILED_INVALID_JWT_INVALID_MEMBER
A JWT was received but its Member was invalid.
-
FAILED_INVALID_JWT_INVALID_URL
public static final JWTAuthenticationHandler.JWTAuthState FAILED_INVALID_JWT_INVALID_URL
A JWT was received but it was used for an unauthorized URL.
-
FAILED_INVALID_JWT_INVALID_HTTP_METHOD
public static final JWTAuthenticationHandler.JWTAuthState FAILED_INVALID_JWT_INVALID_HTTP_METHOD
A JWT was received but it does not authorize the HTTP method that was used.
-
FAILED_INVALID_JWT_INVALID_IP
public static final JWTAuthenticationHandler.JWTAuthState FAILED_INVALID_JWT_INVALID_IP
A JWT was received but it cannot be used from the IP it was sent from.
-
FAILED_JWT_NOT_IN_DB
public static final JWTAuthenticationHandler.JWTAuthState FAILED_JWT_NOT_IN_DB
A JWT was received but it could not be found in database.- Since:
- 10.0.8 / JCMS-4770
-
-
Method Detail
-
values
public static JWTAuthenticationHandler.JWTAuthState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JWTAuthenticationHandler.JWTAuthState c : JWTAuthenticationHandler.JWTAuthState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JWTAuthenticationHandler.JWTAuthState valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isSet
public boolean isSet(AuthenticationContext ctxt)
Check if this state was set for the specified AuthenticationContext- Parameters:
ctxt
- the AuthenticationContext in which to check state- Returns:
- true if state was encountered, false otherwise
-
-