public class OAuth2ClientAuthenticationToken extends AbstractAuthenticationToken
AbstractAuthenticationToken
that represents an OAuth 2.0 Client Authentication.
A client is considered "authenticated",
if it receives a successful response from the Token Endpoint.
This Authentication associates the client identified in getClientRegistration()
to the getAccessToken() granted by the resource owner.
ClientRegistration,
AccessToken,
Section 5.1 Access Token Response,
Serialized Form| Constructor and Description |
|---|
OAuth2ClientAuthenticationToken(ClientRegistration clientRegistration,
AccessToken accessToken) |
| Modifier and Type | Method and Description |
|---|---|
AccessToken |
getAccessToken() |
java.util.Set<java.lang.String> |
getAuthorizedScope() |
ClientRegistration |
getClientRegistration() |
java.lang.Object |
getCredentials()
The credentials that prove the principal is correct.
|
java.lang.Object |
getPrincipal()
The identity of the principal being authenticated.
|
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toStringpublic OAuth2ClientAuthenticationToken(ClientRegistration clientRegistration, AccessToken accessToken)
public java.lang.Object getPrincipal()
Authentication
The AuthenticationManager implementation will often return an
Authentication containing richer information as the principal for use by
the application. Many of the authentication providers will create a
UserDetails object as the principal.
Principal being authenticated or the authenticated
principal after authentication.public java.lang.Object getCredentials()
AuthenticationAuthenticationManager. Callers
are expected to populate the credentials.Principalpublic ClientRegistration getClientRegistration()
public AccessToken getAccessToken()
public java.util.Set<java.lang.String> getAuthorizedScope()