public class JwtClaimsValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
static Duration |
MAX_LIFETIME
No matter what the claims say, the server should reject tokens that are too long-lived.
|
static Duration |
TIME_CLAIM_LEEWAY
The JWT spec says that implementers "MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew".
|
| Constructor and Description |
|---|
JwtClaimsValidator(Clock clock) |
| Modifier and Type | Method and Description |
|---|---|
void |
validate(Jwt jwt,
String resourceServerAudience)
Checks the validity of the claims contained in a JWT in a given authentication context.
|
public static final Duration TIME_CLAIM_LEEWAY
public static final Duration MAX_LIFETIME
public JwtClaimsValidator(Clock clock)
public void validate(Jwt jwt, String resourceServerAudience) throws InvalidTokenException
jwt - a JWT tokenresourceServerAudience - the JWT token must be addressed to this audienceInvalidTokenException - if the claims are invalid or could not be verifiedCopyright © 2016 Atlassian. All rights reserved.