Interface JwtClaimAccessor
-
- All Superinterfaces:
ClaimAccessor
- All Known Implementing Classes:
Jwt
public interface JwtClaimAccessor extends ClaimAccessor
AClaimAccessor
for the "claims" that may be contained in the JSON object JWT Claims Set of a JSON Web Token (JWT).- Since:
- 5.0
- See Also:
ClaimAccessor
,JwtClaimNames
,Jwt
, Registered Claim Names
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.util.List<java.lang.String>
getAudience()
Returns the Audience(aud)
claim which identifies the recipient(s) that the JWT is intended for.default java.time.Instant
getExpiresAt()
Returns the Expiration time(exp)
claim which identifies the expiration time on or after which the JWT MUST NOT be accepted for processing.default java.lang.String
getId()
Returns the JWT ID(jti)
claim which provides a unique identifier for the JWT.default java.time.Instant
getIssuedAt()
Returns the Issued at(iat)
claim which identifies the time at which the JWT was issued.default java.net.URL
getIssuer()
Returns the Issuer(iss)
claim which identifies the principal that issued the JWT.default java.time.Instant
getNotBefore()
Returns the Not Before(nbf)
claim which identifies the time before which the JWT MUST NOT be accepted for processing.default java.lang.String
getSubject()
Returns the Subject(sub)
claim which identifies the principal that is the subject of the JWT.-
Methods inherited from interface org.springframework.security.oauth2.core.ClaimAccessor
containsClaim, getClaim, getClaimAsBoolean, getClaimAsInstant, getClaimAsMap, getClaimAsString, getClaimAsStringList, getClaimAsURL, getClaims
-
-
-
-
Method Detail
-
getIssuer
default java.net.URL getIssuer()
Returns the Issuer(iss)
claim which identifies the principal that issued the JWT.- Returns:
- the Issuer identifier
-
getSubject
default java.lang.String getSubject()
Returns the Subject(sub)
claim which identifies the principal that is the subject of the JWT.- Returns:
- the Subject identifier
-
getAudience
default java.util.List<java.lang.String> getAudience()
Returns the Audience(aud)
claim which identifies the recipient(s) that the JWT is intended for.- Returns:
- the Audience(s) that this JWT intended for
-
getExpiresAt
default java.time.Instant getExpiresAt()
Returns the Expiration time(exp)
claim which identifies the expiration time on or after which the JWT MUST NOT be accepted for processing.- Returns:
- the Expiration time on or after which the JWT MUST NOT be accepted for processing
-
getNotBefore
default java.time.Instant getNotBefore()
Returns the Not Before(nbf)
claim which identifies the time before which the JWT MUST NOT be accepted for processing.- Returns:
- the Not Before time before which the JWT MUST NOT be accepted for processing
-
getIssuedAt
default java.time.Instant getIssuedAt()
Returns the Issued at(iat)
claim which identifies the time at which the JWT was issued.- Returns:
- the Issued at claim which identifies the time at which the JWT was issued
-
getId
default java.lang.String getId()
Returns the JWT ID(jti)
claim which provides a unique identifier for the JWT.- Returns:
- the JWT ID claim which provides a unique identifier for the JWT
-
-