public class ErrorCodes extends Object
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.
| Modifier and Type | Field and Description |
|---|---|
static int |
AUDIENCE_INVALID
The Audience "aud" claim was invalid based on the audience that the
JwtConsumer
was set up to expect. |
static int |
AUDIENCE_MISSING
The JWT had no Audience "aud" claim but the
JwtConsumer was
set up to require it. |
static int |
ENCRYPTION_MISSING
No JWE encryption was present but the
JwtConsumer was
set up to require it. |
static int |
EXPIRATION_MISSING
The JWT had no Expiration Time "exp" claim but the
JwtConsumer was
set up to require it. |
static int |
EXPIRATION_TOO_FAR_IN_FUTURE
The JWT had an Expiration Time "exp" claim with a value that was too far
in the future based on the set up of the
JwtConsumer. |
static int |
EXPIRED
The JWT expired (i.e.
|
static int |
INTEGRITY_MISSING
The
JwtConsumer was 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 int |
ISSUED_AT_MISSING
The JWT had no Issued At "iat" claim but the
JwtConsumer was
set up to require it. |
static int |
ISSUER_INVALID
The Issuer "iss" claim was invalid based on the issuer that the
JwtConsumer
was set up to expect. |
static int |
ISSUER_MISSING
The JWT had no Issuer "iss" claim but the
JwtConsumer was
set up to require it. |
static int |
JSON_INVALID
The JWS/JWE payload could not be parsed as JSON.
|
static int |
JWT_ID_MISSING
The JWT had no JWT ID "jti" claim but the
JwtConsumer was
set up to require it. |
static int |
MALFORMED_CLAIM
A JWT claim was of the wrong type or otherwise malformed.
|
static int |
MISCELLANEOUS
Miscellaneous.
|
static int |
NOT_BEFORE_MISSING
The JWT had no Not Before "nbf" claim but the
JwtConsumer was
set up to require it. |
static int |
NOT_YET_VALID
The Not Before "nbf" claim of the JWT indicates that it is not yet valid.
|
static int |
SIGNATURE_INVALID
The JWS signature was not successfully verified with the given/resolved key.
|
static int |
SIGNATURE_MISSING
No JWS signature was present but the
JwtConsumer was
set up to require one. |
static int |
SUBJECT_INVALID
The Subject "sub" claim was invalid based on the subject that the
JwtConsumer
was set up to expect. |
static int |
SUBJECT_MISSING
The JWT had no Subject "sub" claim but the
JwtConsumer was
set up to require it. |
| Constructor and Description |
|---|
ErrorCodes() |
public static final int EXPIRED
public static final int EXPIRATION_MISSING
JwtConsumer was
set up to require it.public static final int ISSUED_AT_MISSING
JwtConsumer was
set up to require it.public static final int NOT_BEFORE_MISSING
JwtConsumer was
set up to require it.public static final int EXPIRATION_TOO_FAR_IN_FUTURE
JwtConsumer.public static final int NOT_YET_VALID
public static final int AUDIENCE_MISSING
JwtConsumer was
set up to require it.public static final int AUDIENCE_INVALID
JwtConsumer
was set up to expect.public static final int SIGNATURE_INVALID
public static final int SIGNATURE_MISSING
JwtConsumer was
set up to require one.public static final int ISSUER_MISSING
JwtConsumer was
set up to require it.public static final int ISSUER_INVALID
JwtConsumer
was set up to expect.public static final int JWT_ID_MISSING
JwtConsumer was
set up to require it.public static final int SUBJECT_MISSING
JwtConsumer was
set up to require it.public static final int SUBJECT_INVALID
JwtConsumer
was set up to expect.public static final int JSON_INVALID
public static final int MISCELLANEOUS
public static final int MALFORMED_CLAIM
public static final int ENCRYPTION_MISSING
JwtConsumer was
set up to require it.public static final int INTEGRITY_MISSING
JwtConsumer was 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.Copyright © 2019. All rights reserved.