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

public final class OAuth2ClientAuthenticationConfigurer extends Object
Configurer for OAuth 2.0 Client Authentication.
Since:
0.2.0
See Also:
  • Method Details

    • authenticationConverter

      public OAuth2ClientAuthenticationConfigurer authenticationConverter(org.springframework.security.web.authentication.AuthenticationConverter authenticationConverter)
      Adds an AuthenticationConverter used when attempting to extract client credentials from HttpServletRequest to an instance of OAuth2ClientAuthenticationToken used for authenticating the client.
      Parameters:
      authenticationConverter - an AuthenticationConverter used when attempting to extract client credentials from HttpServletRequest
      Returns:
      the OAuth2ClientAuthenticationConfigurer for further configuration
    • authenticationConverters

      public OAuth2ClientAuthenticationConfigurer authenticationConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> authenticationConvertersConsumer)
      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:
      authenticationConvertersConsumer - the Consumer providing access to the List of default and (optionally) added AuthenticationConverter's
      Returns:
      the OAuth2ClientAuthenticationConfigurer for further configuration
      Since:
      0.4.0
    • authenticationProvider

      public OAuth2ClientAuthenticationConfigurer authenticationProvider(org.springframework.security.authentication.AuthenticationProvider authenticationProvider)
      Adds an AuthenticationProvider used for authenticating an OAuth2ClientAuthenticationToken.
      Parameters:
      authenticationProvider - an AuthenticationProvider used for authenticating an OAuth2ClientAuthenticationToken
      Returns:
      the OAuth2ClientAuthenticationConfigurer for further configuration
    • authenticationProviders

      public OAuth2ClientAuthenticationConfigurer 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 OAuth2ClientAuthenticationConfigurer for further configuration
      Since:
      0.4.0
    • authenticationSuccessHandler

      public OAuth2ClientAuthenticationConfigurer authenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler)
      Sets the AuthenticationSuccessHandler used for handling a successful client authentication and associating the OAuth2ClientAuthenticationToken to the SecurityContext.
      Parameters:
      authenticationSuccessHandler - the AuthenticationSuccessHandler used for handling a successful client authentication
      Returns:
      the OAuth2ClientAuthenticationConfigurer for further configuration
    • errorResponseHandler

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

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

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