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.-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2TokenExchangeAuthenticationToken
(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 anOAuth2TokenExchangeAuthenticationToken
using the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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
-
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 anOAuth2TokenExchangeAuthenticationToken
using the provided parameters.- Parameters:
requestedTokenType
- the requested token typesubjectToken
- the subject tokensubjectTokenType
- the subject token typeclientPrincipal
- the authenticated client principalactorToken
- the actor tokenactorTokenType
- the actor token typeresources
- the requested resource URI(s)audiences
- the requested audience value(s)scopes
- the requested scope(s)additionalParameters
- the additional parameters
-
-
Method Details
-
getRequestedTokenType
Returns the requested token type.- Returns:
- the requested token type
-
getSubjectToken
Returns the subject token.- Returns:
- the subject token
-
getSubjectTokenType
Returns the subject token type.- Returns:
- the subject token type
-
getActorToken
Returns the actor token.- Returns:
- the actor token
-
getActorTokenType
Returns the actor token type.- Returns:
- the actor token type
-
getResources
Returns the requested resource URI(s).- Returns:
- the requested resource URI(s), or an empty
Set
if not available
-
getAudiences
Returns the requested audience value(s).- Returns:
- the requested audience value(s), or an empty
Set
if not available
-
getScopes
Returns the requested scope(s).- Returns:
- the requested scope(s), or an empty
Set
if not available
-