Class OAuth2TokenExchangeAuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken
org.springframework.security.oauth2.server.authorization.authentication.OAuth2TokenExchangeAuthenticationToken
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class OAuth2TokenExchangeAuthenticationToken extends OAuth2AuthorizationGrantAuthenticationToken
An Authentication implementation used for the OAuth 2.0 Token Exchange Grant.
Since:
7.0
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>

    Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication

    org.springframework.security.core.Authentication.Builder<B extends org.springframework.security.core.Authentication.Builder<B>>
  • Constructor Summary

    Constructors
    Constructor
    Description
    OAuth2TokenExchangeAuthenticationToken(String requestedTokenType, String subjectToken, String subjectTokenType, org.springframework.security.core.Authentication clientPrincipal, String actorToken, String actorTokenType, Set<String> resources, Set<String> audiences, Set<String> scopes, Map<String,Object> additionalParameters)
    Constructs an OAuth2TokenExchangeAuthenticationToken using the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the actor token.
    Returns the actor token type.
    Returns the requested audience value(s).
    Returns the requested token type.
    Returns the requested resource URI(s).
    Returns the requested scope(s).
    Returns the subject token.
    Returns the subject token type.

    Methods inherited from class org.springframework.security.oauth2.server.authorization.authentication.OAuth2AuthorizationGrantAuthenticationToken

    getAdditionalParameters, getCredentials, getGrantType, getPrincipal

    Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.springframework.security.core.Authentication

    toBuilder

    Methods inherited from interface java.security.Principal

    implies
  • Constructor Details

    • OAuth2TokenExchangeAuthenticationToken

      public OAuth2TokenExchangeAuthenticationToken(String requestedTokenType, String subjectToken, String subjectTokenType, org.springframework.security.core.Authentication clientPrincipal, @Nullable String actorToken, @Nullable String actorTokenType, @Nullable Set<String> resources, @Nullable Set<String> audiences, @Nullable Set<String> scopes, @Nullable Map<String,Object> additionalParameters)
      Constructs an OAuth2TokenExchangeAuthenticationToken using the provided parameters.
      Parameters:
      requestedTokenType - the requested token type
      subjectToken - the subject token
      subjectTokenType - the subject token type
      clientPrincipal - the authenticated client principal
      actorToken - the actor token
      actorTokenType - the actor token type
      resources - the requested resource URI(s)
      audiences - the requested audience value(s)
      scopes - the requested scope(s)
      additionalParameters - the additional parameters
  • Method Details

    • getRequestedTokenType

      public String getRequestedTokenType()
      Returns the requested token type.
      Returns:
      the requested token type
    • getSubjectToken

      public String getSubjectToken()
      Returns the subject token.
      Returns:
      the subject token
    • getSubjectTokenType

      public String getSubjectTokenType()
      Returns the subject token type.
      Returns:
      the subject token type
    • getActorToken

      public String getActorToken()
      Returns the actor token.
      Returns:
      the actor token
    • getActorTokenType

      public String getActorTokenType()
      Returns the actor token type.
      Returns:
      the actor token type
    • getResources

      public Set<String> getResources()
      Returns the requested resource URI(s).
      Returns:
      the requested resource URI(s), or an empty Set if not available
    • getAudiences

      public Set<String> getAudiences()
      Returns the requested audience value(s).
      Returns:
      the requested audience value(s), or an empty Set if not available
    • getScopes

      public Set<String> getScopes()
      Returns the requested scope(s).
      Returns:
      the requested scope(s), or an empty Set if not available