public class JwtClaimsValidator extends Object
| Modifier and Type | Field and Description |
|---|---|
static Duration |
DEFAULT_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) |
JwtClaimsValidator(Clock clock,
Duration maxTokenLifetime) |
| Modifier and Type | Method and Description |
|---|---|
void |
validate(Jwt jwt,
Set<String> resourceServerAudiences)
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 DEFAULT_MAX_LIFETIME
public JwtClaimsValidator(Clock clock)
public void validate(Jwt jwt, Set<String> resourceServerAudiences) throws InvalidTokenException
jwt - a JWT tokenresourceServerAudiences - the JWT token must be addressed to one of these audiencesInvalidTokenException - if the claims are invalid or could not be verifiedCopyright © 2017 Atlassian. All rights reserved.