java.lang.Object
org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2TokenEndpointConfigurer

public final class OAuth2TokenEndpointConfigurer extends Object
Configurer for the OAuth 2.0 Token Endpoint.
Since:
0.1.2
See Also:
  • Method Details

    • accessTokenRequestConverter

      public OAuth2TokenEndpointConfigurer accessTokenRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter accessTokenRequestConverter)
      Adds an AuthenticationConverter used when attempting to extract an Access Token Request from HttpServletRequest to an instance of OAuth2AuthorizationGrantAuthenticationToken used for authenticating the authorization grant.
      Parameters:
      accessTokenRequestConverter - an AuthenticationConverter used when attempting to extract an Access Token Request from HttpServletRequest
      Returns:
      the OAuth2TokenEndpointConfigurer for further configuration
    • accessTokenRequestConverters

      public OAuth2TokenEndpointConfigurer accessTokenRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> accessTokenRequestConvertersConsumer)
      Sets the Consumer providing access to the List of default and (optionally) added AuthenticationConverter's allowing the ability to add, remove, or customize a specific AuthenticationConverter.
      Parameters:
      accessTokenRequestConvertersConsumer - the Consumer providing access to the List of default and (optionally) added AuthenticationConverter's
      Returns:
      the OAuth2TokenEndpointConfigurer for further configuration
      Since:
      0.4.0
    • authenticationProvider

      public OAuth2TokenEndpointConfigurer authenticationProvider(org.springframework.security.authentication.AuthenticationProvider authenticationProvider)
      Adds an AuthenticationProvider used for authenticating a type of OAuth2AuthorizationGrantAuthenticationToken.
      Parameters:
      authenticationProvider - an AuthenticationProvider used for authenticating a type of OAuth2AuthorizationGrantAuthenticationToken
      Returns:
      the OAuth2TokenEndpointConfigurer for further configuration
    • authenticationProviders

      public OAuth2TokenEndpointConfigurer authenticationProviders(Consumer<List<org.springframework.security.authentication.AuthenticationProvider>> authenticationProvidersConsumer)
      Sets the Consumer providing access to the List of default and (optionally) added AuthenticationProvider's allowing the ability to add, remove, or customize a specific AuthenticationProvider.
      Parameters:
      authenticationProvidersConsumer - the Consumer providing access to the List of default and (optionally) added AuthenticationProvider's
      Returns:
      the OAuth2TokenEndpointConfigurer for further configuration
      Since:
      0.4.0
    • accessTokenResponseHandler

      public OAuth2TokenEndpointConfigurer accessTokenResponseHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler accessTokenResponseHandler)
      Sets the AuthenticationSuccessHandler used for handling an OAuth2AccessTokenAuthenticationToken and returning the Access Token Response.
      Parameters:
      accessTokenResponseHandler - the AuthenticationSuccessHandler used for handling an OAuth2AccessTokenAuthenticationToken
      Returns:
      the OAuth2TokenEndpointConfigurer for further configuration
    • errorResponseHandler

      public OAuth2TokenEndpointConfigurer errorResponseHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler errorResponseHandler)
      Sets the AuthenticationFailureHandler used for handling an OAuth2AuthenticationException and returning the Error Response.
      Parameters:
      errorResponseHandler - the AuthenticationFailureHandler used for handling an OAuth2AuthenticationException
      Returns:
      the OAuth2TokenEndpointConfigurer for further configuration
    • postProcess

      protected final <T> T postProcess(T object)
    • getObjectPostProcessor

      protected final org.springframework.security.config.annotation.ObjectPostProcessor<Object> getObjectPostProcessor()