public class OAuth2AuthorizationCodeAuthenticationProvider
extends java.lang.Object
implements org.springframework.security.authentication.AuthenticationProvider
AuthenticationProvider for the OAuth 2.0 Authorization Code Grant.
This AuthenticationProvider is responsible for authenticating
an Authorization Code credential with the Authorization Server's Token Endpoint
and if valid, exchanging it for an Access Token credential.
| Constructor and Description |
|---|
OAuth2AuthorizationCodeAuthenticationProvider(OAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient)
Constructs an
OAuth2AuthorizationCodeAuthenticationProvider using the provided parameters. |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
boolean |
supports(java.lang.Class<?> authentication) |
public OAuth2AuthorizationCodeAuthenticationProvider(OAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest> accessTokenResponseClient)
OAuth2AuthorizationCodeAuthenticationProvider using the provided parameters.accessTokenResponseClient - the client used for requesting the access token credential from the Token Endpointpublic org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
authenticate in interface org.springframework.security.authentication.AuthenticationProviderorg.springframework.security.core.AuthenticationExceptionpublic boolean supports(java.lang.Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProvider