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,Authentication,CredentialsContainer
public class OAuth2TokenExchangeAuthenticationToken
extends OAuth2AuthorizationGrantAuthenticationToken
An
Authentication implementation used for the OAuth 2.0 Token Exchange Grant.-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
AbstractAuthenticationToken.AbstractAuthenticationBuilder<B extends AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>>Nested classes/interfaces inherited from interface org.springframework.security.core.Authentication
Authentication.Builder<B extends Authentication.Builder<B>> -
Constructor Summary
ConstructorsConstructorDescriptionOAuth2TokenExchangeAuthenticationToken(String requestedTokenType, String subjectToken, String subjectTokenType, Authentication clientPrincipal, String actorToken, String actorTokenType, Set<String> resources, Set<String> audiences, Set<String> scopes, Map<String, Object> additionalParameters) Constructs anOAuth2TokenExchangeAuthenticationTokenusing 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, getPrincipalMethods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.security.core.Authentication
toBuilder
-
Constructor Details
-
OAuth2TokenExchangeAuthenticationToken
public OAuth2TokenExchangeAuthenticationToken(String requestedTokenType, String subjectToken, String subjectTokenType, 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 anOAuth2TokenExchangeAuthenticationTokenusing 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
Setif not available
-
getAudiences
Returns the requested audience value(s).- Returns:
- the requested audience value(s), or an empty
Setif not available
-
getScopes
Returns the requested scope(s).- Returns:
- the requested scope(s), or an empty
Setif not available
-