@ThreadSafe public class DefaultJWTClaimsVerifier extends Object implements JWTClaimsVerifier, ClockSkewAware
Performs the following checks:
This class may be extended to perform additional checks.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_CLOCK_SKEW_SECONDS
The default maximum acceptable clock skew, in seconds (60).
|
| Constructor and Description |
|---|
DefaultJWTClaimsVerifier() |
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxClockSkew()
Gets the maximum acceptable clock skew.
|
void |
setMaxClockSkew(int maxClockSkewSeconds)
Sets the maximum acceptable clock skew.
|
void |
verify(JWTClaimsSet claimsSet)
Performs verification of selected or all claims in the specified JWT
claims set.
|
public static final int DEFAULT_MAX_CLOCK_SKEW_SECONDS
public DefaultJWTClaimsVerifier()
public int getMaxClockSkew()
ClockSkewAwaregetMaxClockSkew in interface ClockSkewAwarepublic void setMaxClockSkew(int maxClockSkewSeconds)
ClockSkewAwaresetMaxClockSkew in interface ClockSkewAwaremaxClockSkewSeconds - The maximum acceptable clock skew, in
seconds. Zero if none.public void verify(JWTClaimsSet claimsSet) throws BadJWTException
JWTClaimsVerifierverify in interface JWTClaimsVerifierclaimsSet - The JWT claims set. Not null.BadJWTException - If the JWT claims set is rejected.Copyright © 2016 Connect2id Ltd.. All rights reserved.