Package be.looorent.micronaut.security
Enum SecurityErrorType
- java.lang.Object
-
- java.lang.Enum<SecurityErrorType>
-
- be.looorent.micronaut.security.SecurityErrorType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<SecurityErrorType>,java.lang.constant.Constable
public enum SecurityErrorType extends java.lang.Enum<SecurityErrorType>
Reason when a parsing error occurs on a JWS token;
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTHORIZATION_HEADER_MISSINGWhen the HTTP Authorization header is not presentAUTHORIZATION_HEADER_WRONG_FORMATWhen the HTTP Authorization header does not contain a schema and a tokenAUTHORIZATION_HEADER_WRONG_SCHEMEWhen the HTTP Authorization header does not have the "Bearer" scheme.JWT_EXPIRED[io.jsonwebtoken.ExpiredJwtException]JWT_MALFORMED[io.jsonwebtoken.MalformedJwtException]JWT_UNSUPPORTEDsee [io.jsonwebtoken.UnsupportedJwtException]JWT_WRONG_KIDJWT_WRONG_SIGNATURE[io.jsonwebtoken.SignatureException]UNKWOWNVALIDATIONWhen aTokenValidatorhas rejected a token.
-
Method Summary
Modifier and Type Method Description java.lang.StringgetReason()SecurityExceptiontoException()static SecurityErrorTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static SecurityErrorType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JWT_UNSUPPORTED
public static final SecurityErrorType JWT_UNSUPPORTED
see [io.jsonwebtoken.UnsupportedJwtException]
-
JWT_MALFORMED
public static final SecurityErrorType JWT_MALFORMED
[io.jsonwebtoken.MalformedJwtException]
-
JWT_EXPIRED
public static final SecurityErrorType JWT_EXPIRED
[io.jsonwebtoken.ExpiredJwtException]
-
JWT_WRONG_SIGNATURE
public static final SecurityErrorType JWT_WRONG_SIGNATURE
[io.jsonwebtoken.SignatureException]
-
JWT_WRONG_KID
public static final SecurityErrorType JWT_WRONG_KID
-
UNKWOWN
public static final SecurityErrorType UNKWOWN
-
AUTHORIZATION_HEADER_MISSING
public static final SecurityErrorType AUTHORIZATION_HEADER_MISSING
When the HTTP Authorization header is not present
-
AUTHORIZATION_HEADER_WRONG_FORMAT
public static final SecurityErrorType AUTHORIZATION_HEADER_WRONG_FORMAT
When the HTTP Authorization header does not contain a schema and a token
-
AUTHORIZATION_HEADER_WRONG_SCHEME
public static final SecurityErrorType AUTHORIZATION_HEADER_WRONG_SCHEME
When the HTTP Authorization header does not have the "Bearer" scheme.
-
VALIDATION
public static final SecurityErrorType VALIDATION
When aTokenValidatorhas rejected a token.
-
-
Method Detail
-
values
public static SecurityErrorType[] 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 SecurityErrorType 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
-
toException
public SecurityException toException()
-
getReason
public java.lang.String getReason()
-
-