Package org.jose4j.jwt.consumer
Class ErrorCodes
java.lang.Object
org.jose4j.jwt.consumer.ErrorCodes
Error codes, as int values, used by this library for
programmatic access to (some) specific reasons for JWT invalidity
by using InvalidJwtException.hasErrorCode(int).
New error code values may be added and used in future versions but only nonnegative values will be utilized. Thus custom ErrorCodeValidator implementations should use negative values for error codes so as to avoid potential collisions with error code values used by this library.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe Audience "aud" claim was invalid based on the audience that theJwtConsumerwas set up to expect.static final intThe JWT had no Audience "aud" claim but theJwtConsumerwas set up to require it.static final intNo JWE encryption was present but theJwtConsumerwas set up to require it.static final intThe JWT had no Expiration Time "exp" claim but theJwtConsumerwas set up to require it.static final intThe JWT had an Expiration Time "exp" claim with a value that was too far in the future based on the set up of theJwtConsumer.static final intThe JWT expired (i.e.static final intTheJwtConsumerwas set up to require a JOSE algorithm that provides integrity protection (signature/MAC JWS or symmetric JWE) but no such protection was present on the JWT.static final intThe value of the Issued At "iat" claim is too far in the future.static final intThe value of the Issued At "iat" claim is too far in the past.static final intThe JWT had no Issued At "iat" claim but theJwtConsumerwas set up to require it.static final intThe Issuer "iss" claim was invalid based on the issuer that theJwtConsumerwas set up to expect.static final intThe JWT had no Issuer "iss" claim but theJwtConsumerwas set up to require it.static final intThe JWS/JWE payload could not be parsed as JSON.static final intThe JWT had no JWT ID "jti" claim but theJwtConsumerwas set up to require it.static final intA JWT claim was of the wrong type or otherwise malformed.static final intMiscellaneous.static final intThe JWT had no Not Before "nbf" claim but theJwtConsumerwas set up to require it.static final intThe Not Before "nbf" claim of the JWT indicates that it is not yet valid.static final intThe JWS signature was not successfully verified with the given/resolved key.static final intNo JWS signature was present but theJwtConsumerwas set up to require one.static final intThe Subject "sub" claim was invalid based on the subject that theJwtConsumerwas set up to expect.static final intThe JWT had no Subject "sub" claim but theJwtConsumerwas set up to require it.static final intThe type "typ" header value was invalid based on the type that theJwtConsumerwas set up to expect.static final intNo "typ" header parameter was present in the innermost JWS/JWE but theJwtConsumerwas set up to require explicit typing. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EXPIRED
public static final int EXPIREDThe JWT expired (i.e. the Expiration Time "exp" claim identified a time in the past).- See Also:
-
EXPIRATION_MISSING
public static final int EXPIRATION_MISSINGThe JWT had no Expiration Time "exp" claim but theJwtConsumerwas set up to require it.- See Also:
-
ISSUED_AT_MISSING
public static final int ISSUED_AT_MISSINGThe JWT had no Issued At "iat" claim but theJwtConsumerwas set up to require it.- See Also:
-
NOT_BEFORE_MISSING
public static final int NOT_BEFORE_MISSINGThe JWT had no Not Before "nbf" claim but theJwtConsumerwas set up to require it.- See Also:
-
EXPIRATION_TOO_FAR_IN_FUTURE
public static final int EXPIRATION_TOO_FAR_IN_FUTUREThe JWT had an Expiration Time "exp" claim with a value that was too far in the future based on the set up of theJwtConsumer.- See Also:
-
NOT_YET_VALID
public static final int NOT_YET_VALIDThe Not Before "nbf" claim of the JWT indicates that it is not yet valid.- See Also:
-
AUDIENCE_MISSING
public static final int AUDIENCE_MISSINGThe JWT had no Audience "aud" claim but theJwtConsumerwas set up to require it.- See Also:
-
AUDIENCE_INVALID
public static final int AUDIENCE_INVALIDThe Audience "aud" claim was invalid based on the audience that theJwtConsumerwas set up to expect.- See Also:
-
SIGNATURE_INVALID
public static final int SIGNATURE_INVALIDThe JWS signature was not successfully verified with the given/resolved key.- See Also:
-
SIGNATURE_MISSING
public static final int SIGNATURE_MISSINGNo JWS signature was present but theJwtConsumerwas set up to require one.- See Also:
-
ISSUER_MISSING
public static final int ISSUER_MISSINGThe JWT had no Issuer "iss" claim but theJwtConsumerwas set up to require it.- See Also:
-
ISSUER_INVALID
public static final int ISSUER_INVALIDThe Issuer "iss" claim was invalid based on the issuer that theJwtConsumerwas set up to expect.- See Also:
-
JWT_ID_MISSING
public static final int JWT_ID_MISSINGThe JWT had no JWT ID "jti" claim but theJwtConsumerwas set up to require it.- See Also:
-
SUBJECT_MISSING
public static final int SUBJECT_MISSINGThe JWT had no Subject "sub" claim but theJwtConsumerwas set up to require it.- See Also:
-
SUBJECT_INVALID
public static final int SUBJECT_INVALIDThe Subject "sub" claim was invalid based on the subject that theJwtConsumerwas set up to expect.- See Also:
-
JSON_INVALID
public static final int JSON_INVALIDThe JWS/JWE payload could not be parsed as JSON.- See Also:
-
MISCELLANEOUS
public static final int MISCELLANEOUSMiscellaneous.- See Also:
-
MALFORMED_CLAIM
public static final int MALFORMED_CLAIMA JWT claim was of the wrong type or otherwise malformed.- See Also:
-
ENCRYPTION_MISSING
public static final int ENCRYPTION_MISSINGNo JWE encryption was present but theJwtConsumerwas set up to require it.- See Also:
-
INTEGRITY_MISSING
public static final int INTEGRITY_MISSINGTheJwtConsumerwas set up to require a JOSE algorithm that provides integrity protection (signature/MAC JWS or symmetric JWE) but no such protection was present on the JWT.- See Also:
-
TYPE_MISSING
public static final int TYPE_MISSINGNo "typ" header parameter was present in the innermost JWS/JWE but theJwtConsumerwas set up to require explicit typing.- See Also:
-
TYPE_INVALID
public static final int TYPE_INVALIDThe type "typ" header value was invalid based on the type that theJwtConsumerwas set up to expect.- See Also:
-
ISSUED_AT_INVALID_FUTURE
public static final int ISSUED_AT_INVALID_FUTUREThe value of the Issued At "iat" claim is too far in the future.- See Also:
-
ISSUED_AT_INVALID_PAST
public static final int ISSUED_AT_INVALID_PASTThe value of the Issued At "iat" claim is too far in the past.- See Also:
-
-
Constructor Details
-
ErrorCodes
public ErrorCodes()
-