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:
1.3
See Also:
  • 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