Class OAuth2TokenEndpointConfigurer
java.lang.Object
org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer
Configurer for the OAuth 2.0 Token Endpoint.
-
Method Summary
Modifier and TypeMethodDescriptionaccessTokenRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter accessTokenRequestConverter) Adds anAuthenticationConverterused when attempting to extract an Access Token Request fromHttpServletRequestto an instance ofOAuth2AuthorizationGrantAuthenticationTokenused for authenticating the authorization grant.accessTokenRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> accessTokenRequestConvertersConsumer) Sets theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's allowing the ability to add, remove, or customize a specificAuthenticationConverter.accessTokenResponseHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler accessTokenResponseHandler) Sets theAuthenticationSuccessHandlerused for handling anOAuth2AccessTokenAuthenticationTokenand returning theAccess Token Response.authenticationProvider(org.springframework.security.authentication.AuthenticationProvider authenticationProvider) Adds anAuthenticationProviderused for authenticating a type ofOAuth2AuthorizationGrantAuthenticationToken.authenticationProviders(Consumer<List<org.springframework.security.authentication.AuthenticationProvider>> authenticationProvidersConsumer) Sets theConsumerproviding access to theListof default and (optionally) addedAuthenticationProvider's allowing the ability to add, remove, or customize a specificAuthenticationProvider.errorResponseHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler errorResponseHandler) Sets theAuthenticationFailureHandlerused for handling anOAuth2AuthenticationExceptionand returning theError Response.protected final org.springframework.security.config.annotation.ObjectPostProcessor<Object>protected final <T> TpostProcess(T object)
-
Method Details
-
accessTokenRequestConverter
public OAuth2TokenEndpointConfigurer accessTokenRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter accessTokenRequestConverter) Adds anAuthenticationConverterused when attempting to extract an Access Token Request fromHttpServletRequestto an instance ofOAuth2AuthorizationGrantAuthenticationTokenused for authenticating the authorization grant.- Parameters:
accessTokenRequestConverter- anAuthenticationConverterused when attempting to extract an Access Token Request fromHttpServletRequest- Returns:
- the
OAuth2TokenEndpointConfigurerfor further configuration
-
accessTokenRequestConverters
public OAuth2TokenEndpointConfigurer accessTokenRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> accessTokenRequestConvertersConsumer) Sets theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's allowing the ability to add, remove, or customize a specificAuthenticationConverter.- Parameters:
accessTokenRequestConvertersConsumer- theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's- Returns:
- the
OAuth2TokenEndpointConfigurerfor further configuration - Since:
- 0.4.0
-
authenticationProvider
public OAuth2TokenEndpointConfigurer authenticationProvider(org.springframework.security.authentication.AuthenticationProvider authenticationProvider) Adds anAuthenticationProviderused for authenticating a type ofOAuth2AuthorizationGrantAuthenticationToken.- Parameters:
authenticationProvider- anAuthenticationProviderused for authenticating a type ofOAuth2AuthorizationGrantAuthenticationToken- Returns:
- the
OAuth2TokenEndpointConfigurerfor further configuration
-
authenticationProviders
public OAuth2TokenEndpointConfigurer authenticationProviders(Consumer<List<org.springframework.security.authentication.AuthenticationProvider>> authenticationProvidersConsumer) Sets theConsumerproviding access to theListof default and (optionally) addedAuthenticationProvider's allowing the ability to add, remove, or customize a specificAuthenticationProvider.- Parameters:
authenticationProvidersConsumer- theConsumerproviding access to theListof default and (optionally) addedAuthenticationProvider's- Returns:
- the
OAuth2TokenEndpointConfigurerfor further configuration - Since:
- 0.4.0
-
accessTokenResponseHandler
public OAuth2TokenEndpointConfigurer accessTokenResponseHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler accessTokenResponseHandler) Sets theAuthenticationSuccessHandlerused for handling anOAuth2AccessTokenAuthenticationTokenand returning theAccess Token Response.- Parameters:
accessTokenResponseHandler- theAuthenticationSuccessHandlerused for handling anOAuth2AccessTokenAuthenticationToken- Returns:
- the
OAuth2TokenEndpointConfigurerfor further configuration
-
errorResponseHandler
public OAuth2TokenEndpointConfigurer errorResponseHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler errorResponseHandler) Sets theAuthenticationFailureHandlerused for handling anOAuth2AuthenticationExceptionand returning theError Response.- Parameters:
errorResponseHandler- theAuthenticationFailureHandlerused for handling anOAuth2AuthenticationException- Returns:
- the
OAuth2TokenEndpointConfigurerfor further configuration
-
postProcess
protected final <T> T postProcess(T object) -
getObjectPostProcessor
protected final org.springframework.security.config.annotation.ObjectPostProcessor<Object> getObjectPostProcessor()
-