public class OAuth2ClientCredentialsAuthenticationToken
extends AbstractAuthenticationToken
Authentication
implementation used for the OAuth 2.0 Client Credentials Grant.AbstractAuthenticationToken
, OAuth2ClientCredentialsAuthenticationProvider
, OAuth2ClientAuthenticationToken
Constructor and Description |
---|
OAuth2ClientCredentialsAuthenticationToken(Authentication clientPrincipal) Constructs an OAuth2ClientCredentialsAuthenticationToken using the provided parameters. |
OAuth2ClientCredentialsAuthenticationToken(Authentication clientPrincipal, Set<String> scopes) Constructs an OAuth2ClientCredentialsAuthenticationToken using the provided parameters. |
Modifier and Type | Method and Description |
---|---|
Object | getCredentials() |
Object | getPrincipal() |
Set<String> | getScopes() Returns the requested scope(s). |
public OAuth2ClientCredentialsAuthenticationToken(Authentication clientPrincipal)
OAuth2ClientCredentialsAuthenticationToken
using the provided parameters.clientPrincipal
- the authenticated client principalpublic OAuth2ClientCredentialsAuthenticationToken(Authentication clientPrincipal, Set<String> scopes)
OAuth2ClientCredentialsAuthenticationToken
using the provided parameters.clientPrincipal
- the authenticated client principalscopes
- the requested scope(s)