public class OAuth2AccessTokenAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
Authentication implementation used when issuing an
OAuth 2.0 Access Token and (optional) Refresh Token.AbstractAuthenticationToken,
RegisteredClient,
OAuth2AccessToken,
OAuth2RefreshToken,
OAuth2ClientAuthenticationToken,
Serialized Form| Constructor and Description |
|---|
OAuth2AccessTokenAuthenticationToken(RegisteredClient registeredClient,
org.springframework.security.core.Authentication clientPrincipal,
org.springframework.security.oauth2.core.OAuth2AccessToken accessToken)
Constructs an
OAuth2AccessTokenAuthenticationToken using the provided parameters. |
OAuth2AccessTokenAuthenticationToken(RegisteredClient registeredClient,
org.springframework.security.core.Authentication clientPrincipal,
org.springframework.security.oauth2.core.OAuth2AccessToken accessToken,
org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken)
Constructs an
OAuth2AccessTokenAuthenticationToken using the provided parameters. |
OAuth2AccessTokenAuthenticationToken(RegisteredClient registeredClient,
org.springframework.security.core.Authentication clientPrincipal,
org.springframework.security.oauth2.core.OAuth2AccessToken accessToken,
org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken,
java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
Constructs an
OAuth2AccessTokenAuthenticationToken using the provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.oauth2.core.OAuth2AccessToken |
getAccessToken()
Returns the
access token. |
java.util.Map<java.lang.String,java.lang.Object> |
getAdditionalParameters()
Returns the additional parameters.
|
java.lang.Object |
getCredentials() |
java.lang.Object |
getPrincipal() |
org.springframework.security.oauth2.core.OAuth2RefreshToken |
getRefreshToken()
Returns the
refresh token. |
RegisteredClient |
getRegisteredClient()
Returns the
registered client. |
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringpublic OAuth2AccessTokenAuthenticationToken(RegisteredClient registeredClient, org.springframework.security.core.Authentication clientPrincipal, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken)
OAuth2AccessTokenAuthenticationToken using the provided parameters.registeredClient - the registered clientclientPrincipal - the authenticated client principalaccessToken - the access tokenpublic OAuth2AccessTokenAuthenticationToken(RegisteredClient registeredClient, org.springframework.security.core.Authentication clientPrincipal, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, @Nullable org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken)
OAuth2AccessTokenAuthenticationToken using the provided parameters.registeredClient - the registered clientclientPrincipal - the authenticated client principalaccessToken - the access tokenrefreshToken - the refresh tokenpublic OAuth2AccessTokenAuthenticationToken(RegisteredClient registeredClient, org.springframework.security.core.Authentication clientPrincipal, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, @Nullable org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken, java.util.Map<java.lang.String,java.lang.Object> additionalParameters)
OAuth2AccessTokenAuthenticationToken using the provided parameters.registeredClient - the registered clientclientPrincipal - the authenticated client principalaccessToken - the access tokenrefreshToken - the refresh tokenadditionalParameters - the additional parameterspublic java.lang.Object getPrincipal()
public java.lang.Object getCredentials()
public RegisteredClient getRegisteredClient()
registered client.RegisteredClientpublic org.springframework.security.oauth2.core.OAuth2AccessToken getAccessToken()
access token.OAuth2AccessToken@Nullable public org.springframework.security.oauth2.core.OAuth2RefreshToken getRefreshToken()
refresh token.OAuth2RefreshToken or null if not availablepublic java.util.Map<java.lang.String,java.lang.Object> getAdditionalParameters()
Map of the additional parameters, may be empty