public class OAuth2ClientAuthenticationToken
extends AbstractAuthenticationToken
Authentication
implementation used for OAuth 2.0 Client Authentication.AbstractAuthenticationToken
, RegisteredClient
, OAuth2ClientAuthenticationProvider
Constructor and Description |
---|
OAuth2ClientAuthenticationToken(RegisteredClient registeredClient) Constructs an OAuth2ClientAuthenticationToken using the provided parameters. |
OAuth2ClientAuthenticationToken(String clientId, String clientSecret) Constructs an OAuth2ClientAuthenticationToken using the provided parameters. |
Modifier and Type | Method and Description |
---|---|
Object | getCredentials() |
Object | getPrincipal() |
RegisteredClient | getRegisteredClient() Returns the registered client . |
public OAuth2ClientAuthenticationToken(String clientId, String clientSecret)
OAuth2ClientAuthenticationToken
using the provided parameters.clientId
- the client identifierclientSecret
- the client secretpublic OAuth2ClientAuthenticationToken(RegisteredClient registeredClient)
OAuth2ClientAuthenticationToken
using the provided parameters.registeredClient
- the registered clientpublic Object getPrincipal()
public Object getCredentials()
public RegisteredClient getRegisteredClient()
registered client
.RegisteredClient