Interface OAuth2TokenClaimAccessor

All Superinterfaces:
org.springframework.security.oauth2.core.ClaimAccessor
All Known Implementing Classes:
OAuth2TokenClaimsSet

public interface OAuth2TokenClaimAccessor extends org.springframework.security.oauth2.core.ClaimAccessor
A ClaimAccessor for the "claims" that may be contained in an OAuth2TokenClaimsSet.
Since:
7.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default @Nullable List<String>
    Returns the Audience (aud) claim which identifies the recipient(s) that the OAuth 2.0 Token is intended for.
    default @Nullable Instant
    Returns the Expiration time (exp) claim which identifies the expiration time on or after which the OAuth 2.0 Token MUST NOT be accepted for processing.
    default @Nullable String
    Returns the ID (jti) claim which provides a unique identifier for the OAuth 2.0 Token.
    default @Nullable Instant
    Returns the Issued at (iat) claim which identifies the time at which the OAuth 2.0 Token was issued.
    default @Nullable URL
    Returns the Issuer (iss) claim which identifies the principal that issued the OAuth 2.0 Token.
    default @Nullable Instant
    Returns the Not Before (nbf) claim which identifies the time before which the OAuth 2.0 Token MUST NOT be accepted for processing.
    default @Nullable String
    Returns the Subject (sub) claim which identifies the principal that is the subject of the OAuth 2.0 Token.

    Methods inherited from interface org.springframework.security.oauth2.core.ClaimAccessor

    getClaim, getClaimAsBoolean, getClaimAsInstant, getClaimAsMap, getClaimAsString, getClaimAsStringList, getClaimAsURL, getClaims, hasClaim
  • Method Details

    • getIssuer

      default @Nullable URL getIssuer()
      Returns the Issuer (iss) claim which identifies the principal that issued the OAuth 2.0 Token.
      Returns:
      the Issuer identifier, or null if not present
    • getSubject

      default @Nullable String getSubject()
      Returns the Subject (sub) claim which identifies the principal that is the subject of the OAuth 2.0 Token.
      Returns:
      the Subject identifier, or null if not present
    • getAudience

      default @Nullable List<String> getAudience()
      Returns the Audience (aud) claim which identifies the recipient(s) that the OAuth 2.0 Token is intended for.
      Returns:
      the Audience(s) that this OAuth 2.0 Token is intended for, or null if not present
    • getExpiresAt

      default @Nullable Instant getExpiresAt()
      Returns the Expiration time (exp) claim which identifies the expiration time on or after which the OAuth 2.0 Token MUST NOT be accepted for processing.
      Returns:
      the Expiration time on or after which the OAuth 2.0 Token MUST NOT be accepted for processing, or null if not present
    • getNotBefore

      default @Nullable Instant getNotBefore()
      Returns the Not Before (nbf) claim which identifies the time before which the OAuth 2.0 Token MUST NOT be accepted for processing.
      Returns:
      the Not Before time before which the OAuth 2.0 Token MUST NOT be accepted for processing, or null if not present
    • getIssuedAt

      default @Nullable Instant getIssuedAt()
      Returns the Issued at (iat) claim which identifies the time at which the OAuth 2.0 Token was issued.
      Returns:
      the Issued at claim which identifies the time at which the OAuth 2.0 Token was issued, or null if not present
    • getId

      default @Nullable String getId()
      Returns the ID (jti) claim which provides a unique identifier for the OAuth 2.0 Token.
      Returns:
      the ID claim which provides a unique identifier for the OAuth 2.0 Token, or null if not present