Class OAuth2DeviceAuthorizationEndpointConfigurer

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

public final class OAuth2DeviceAuthorizationEndpointConfigurer extends Object
Configurer for the OAuth 2.0 Device Authorization Endpoint.
Since:
7.0
See Also:
  • Method Details

    • deviceAuthorizationRequestConverter

      public OAuth2DeviceAuthorizationEndpointConfigurer deviceAuthorizationRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter deviceAuthorizationRequestConverter)
      Sets the AuthenticationConverter used when attempting to extract a Device Authorization Request from HttpServletRequest to an instance of OAuth2DeviceAuthorizationRequestAuthenticationToken used for authenticating the request.
      Parameters:
      deviceAuthorizationRequestConverter - the AuthenticationConverter used when attempting to extract a Device Authorization Request from HttpServletRequest
      Returns:
      the OAuth2DeviceAuthorizationEndpointConfigurer for further configuration
    • deviceAuthorizationRequestConverters

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

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

      public OAuth2DeviceAuthorizationEndpointConfigurer 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 OAuth2DeviceAuthorizationEndpointConfigurer for further configuration
    • deviceAuthorizationResponseHandler

      public OAuth2DeviceAuthorizationEndpointConfigurer deviceAuthorizationResponseHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler deviceAuthorizationResponseHandler)
      Sets the AuthenticationSuccessHandler used for handling an OAuth2DeviceAuthorizationRequestAuthenticationToken and returning the Device Authorization Response.
      Parameters:
      deviceAuthorizationResponseHandler - the AuthenticationSuccessHandler used for handling an OAuth2DeviceAuthorizationRequestAuthenticationToken
      Returns:
      the OAuth2DeviceAuthorizationEndpointConfigurer for further configuration
    • errorResponseHandler

      public OAuth2DeviceAuthorizationEndpointConfigurer 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 OAuth2DeviceAuthorizationEndpointConfigurer for further configuration
    • verificationUri

      public OAuth2DeviceAuthorizationEndpointConfigurer verificationUri(String verificationUri)
      Sets the end-user verification URI on the authorization server.
      Parameters:
      verificationUri - the end-user verification URI on the authorization server
      Returns:
      the OAuth2DeviceAuthorizationEndpointConfigurer for further configuration
    • init

      public void init(HttpSecurity builder)
    • configure

      public void configure(HttpSecurity builder)
    • postProcess

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

      protected final ObjectPostProcessor<Object> getObjectPostProcessor()