Class OAuth2TokenIntrospectionEndpointConfigurer

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

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

    • introspectionRequestConverter

      public OAuth2TokenIntrospectionEndpointConfigurer introspectionRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter introspectionRequestConverter)
      Adds an AuthenticationConverter used when attempting to extract an Introspection Request from HttpServletRequest to an instance of OAuth2TokenIntrospectionAuthenticationToken used for authenticating the request.
      Parameters:
      introspectionRequestConverter - an AuthenticationConverter used when attempting to extract an Introspection Request from HttpServletRequest
      Returns:
      the OAuth2TokenIntrospectionEndpointConfigurer for further configuration
    • introspectionRequestConverters

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

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

      public OAuth2TokenIntrospectionEndpointConfigurer 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 OAuth2TokenIntrospectionEndpointConfigurer for further configuration
    • introspectionResponseHandler

      public OAuth2TokenIntrospectionEndpointConfigurer introspectionResponseHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler introspectionResponseHandler)
      Sets the AuthenticationSuccessHandler used for handling an OAuth2TokenIntrospectionAuthenticationToken.
      Parameters:
      introspectionResponseHandler - the AuthenticationSuccessHandler used for handling an OAuth2TokenIntrospectionAuthenticationToken
      Returns:
      the OAuth2TokenIntrospectionEndpointConfigurer for further configuration
    • errorResponseHandler

      public OAuth2TokenIntrospectionEndpointConfigurer 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 OAuth2TokenIntrospectionEndpointConfigurer for further configuration
    • postProcess

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

      protected final ObjectPostProcessor<Object> getObjectPostProcessor()