Module jakarta.security
Interface JwtClaims
-
Field Summary
-
Method Summary
Modifier 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 boolean
isBeforeValidity
(Clock clock, boolean required, Duration skew) Check if JWT is before its defined validitydefault boolean
Check if JWT is expireddefault boolean
isValid()
Check JWT validity against current time with 1MIN clock skew.Methods inherited from interface jakarta.security.enterprise.identitystore.openid.Claims
getArrayStringClaim, getDoubleClaim, getIntClaim, getLongClaim, getNested, getNumericDateClaim, getStringClaim
-
Field Details
-
NONE
Singleton instance representing no claims
-
-
Method Details
-
getIssuer
-
getSubject
-
getAudience
The 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
aud
claim
-
getExpirationTime
-
isExpired
Check if JWT is expired- Parameters:
clock
- Clock representing reference time of checkingrequired
- indication whether the claim is required, i. e. whether token with claim is considered expiredskew
- allowed clock skew to account for drift between provider and us- Returns:
- true when current time is past expiration time, or
exp
claim is not present andrequired
istrue
-
getNotBeforeTime
-
isBeforeValidity
Check if JWT is before its defined validity- Parameters:
clock
- Clock representing reference time of checkingrequired
- indication, whether the claim is required, i. e. whether token without nbf is considered before validityskew
- allowed clock skew to account for drift between provider and us- Returns:
-
isValid
default 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
-