Module jakarta.security
Interface JwtClaims
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionThe recipients that the JWT is intended for.Expiration time on or after which the JWT MUST NOT be accepted for processing.The time at which the JWT was issued.The principal that issued the JWTgetJwtId()Unique identifier for the JWTThe time before which the JWT MUST NOT be accepted for processing.The principal that is the subject of the JWT.default booleanisBeforeValidity(Clock clock, boolean required, Duration skew) Check if JWT is before its defined validitydefault booleanCheck if JWT is expireddefault booleanisValid()Check JWT validity against current time with 1MIN clock skew.Methods inherited from interface jakarta.security.enterprise.identitystore.openid.ClaimsgetArrayStringClaim, getDoubleClaim, getIntClaim, getLongClaim, getNested, getNumericDateClaim, getStringClaim
- 
Field Details- 
NONESingleton instance representing no claims
 
- 
- 
Method Details- 
getIssuer
- 
getSubject
- 
getAudienceThe recipients that the JWT is intended for. To ease work with the field, audience is always represented as list, also in special cases -- it is singleton list when it was a string in the token, and empty set if it was not present.- Returns:
- non-null set representing the values of audclaim
 
- 
getExpirationTime
- 
isExpiredCheck if JWT is expired- Parameters:
- clock- Clock representing reference time of checking
- required- indication whether the claim is required, i. e. whether token with claim is considered expired
- skew- allowed clock skew to account for drift between provider and us
- Returns:
-  true when current time is past expiration time, or expclaim is not present andrequiredistrue
 
- 
getNotBeforeTime
- 
isBeforeValidityCheck if JWT is before its defined validity- Parameters:
- clock- Clock representing reference time of checking
- required- indication, whether the claim is required, i. e. whether token without nbf is considered before validity
- skew- allowed clock skew to account for drift between provider and us
- Returns:
 
- 
isValiddefault boolean isValid()Check JWT validity against current time with 1MIN clock skew.- Returns:
- true if exp token is present and within limits and nbf is within limits when present
 
- 
getIssuedAt
- 
getJwtId
 
-