public final class JWTVerifier extends java.lang.Object implements JWTVerifier
Modifier and Type | Class and Description |
---|---|
static class |
JWTVerifier.BaseVerification |
Modifier and Type | Method and Description |
---|---|
DecodedJWT |
verify(DecodedJWT jwt)
Perform the verification against the given decoded JWT, using any previous configured options.
|
DecodedJWT |
verify(java.lang.String token)
Perform the verification against the given Token, using any previous configured options.
|
public DecodedJWT verify(java.lang.String token) throws JWTVerificationException
verify
in interface JWTVerifier
token
- to verify.AlgorithmMismatchException
- if the algorithm stated in the token's header it's not equal to the one defined in the JWTVerifier
.SignatureVerificationException
- if the signature is invalid.TokenExpiredException
- if the token has expired.InvalidClaimException
- if a claim contained a different value than the expected one.JWTVerificationException
- if any of the verification steps failpublic DecodedJWT verify(DecodedJWT jwt) throws JWTVerificationException
verify
in interface JWTVerifier
jwt
- to verify.AlgorithmMismatchException
- if the algorithm stated in the token's header it's not equal to the one defined in the JWTVerifier
.SignatureVerificationException
- if the signature is invalid.TokenExpiredException
- if the token has expired.InvalidClaimException
- if a claim contained a different value than the expected one.JWTVerificationException
- if any of the verification steps fail