Class OAuth2DeviceVerificationEndpointConfigurer
java.lang.Object
org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2DeviceVerificationEndpointConfigurer
Configurer for the OAuth 2.0 Device Verification Endpoint.
- Since:
- 1.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionauthenticationProvider(org.springframework.security.authentication.AuthenticationProvider authenticationProvider) Adds anAuthenticationProviderused for authenticating anOAuth2DeviceVerificationAuthenticationTokenorOAuth2DeviceAuthorizationConsentAuthenticationToken.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.voidconfigure(org.springframework.security.config.annotation.web.builders.HttpSecurity builder) consentPage(String consentPage) Specify the URI to redirect Resource Owners to if consent is required during thedevice_codeflow.deviceVerificationRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter deviceVerificationRequestConverter) Sets theAuthenticationConverterused when attempting to extract a Device Verification Request (or Device Authorization Consent) fromHttpServletRequestto an instance ofOAuth2DeviceVerificationAuthenticationTokenorOAuth2DeviceAuthorizationConsentAuthenticationTokenused for authenticating the request.deviceVerificationRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> deviceVerificationRequestConvertersConsumer) Sets theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's allowing the ability to add, remove, or customize a specificAuthenticationConverter.deviceVerificationResponseHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler deviceVerificationResponseHandler) Sets theAuthenticationSuccessHandlerused for handling anOAuth2DeviceVerificationAuthenticationTokenand returning the response.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>voidinit(org.springframework.security.config.annotation.web.builders.HttpSecurity builder) protected final <T> TpostProcess(T object)
-
Method Details
-
deviceVerificationRequestConverter
public OAuth2DeviceVerificationEndpointConfigurer deviceVerificationRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter deviceVerificationRequestConverter) Sets theAuthenticationConverterused when attempting to extract a Device Verification Request (or Device Authorization Consent) fromHttpServletRequestto an instance ofOAuth2DeviceVerificationAuthenticationTokenorOAuth2DeviceAuthorizationConsentAuthenticationTokenused for authenticating the request.- Parameters:
deviceVerificationRequestConverter- theAuthenticationConverterused when attempting to extract a Device Verification Request (or Device Authorization Consent) fromHttpServletRequest- Returns:
- the
OAuth2DeviceVerificationEndpointConfigurerfor further configuration
-
deviceVerificationRequestConverters
public OAuth2DeviceVerificationEndpointConfigurer deviceVerificationRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> deviceVerificationRequestConvertersConsumer) Sets theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's allowing the ability to add, remove, or customize a specificAuthenticationConverter.- Parameters:
deviceVerificationRequestConvertersConsumer- theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's- Returns:
- the
OAuth2DeviceVerificationEndpointConfigurerfor further configuration
-
authenticationProvider
public OAuth2DeviceVerificationEndpointConfigurer authenticationProvider(org.springframework.security.authentication.AuthenticationProvider authenticationProvider) Adds anAuthenticationProviderused for authenticating anOAuth2DeviceVerificationAuthenticationTokenorOAuth2DeviceAuthorizationConsentAuthenticationToken.- Parameters:
authenticationProvider- anAuthenticationProviderused for authenticating anOAuth2DeviceVerificationAuthenticationTokenorOAuth2DeviceAuthorizationConsentAuthenticationToken- Returns:
- the
OAuth2DeviceVerificationEndpointConfigurerfor further configuration
-
authenticationProviders
public OAuth2DeviceVerificationEndpointConfigurer 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
OAuth2DeviceVerificationEndpointConfigurerfor further configuration
-
deviceVerificationResponseHandler
public OAuth2DeviceVerificationEndpointConfigurer deviceVerificationResponseHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler deviceVerificationResponseHandler) Sets theAuthenticationSuccessHandlerused for handling anOAuth2DeviceVerificationAuthenticationTokenand returning the response.- Parameters:
deviceVerificationResponseHandler- theAuthenticationSuccessHandlerused for handling anOAuth2DeviceVerificationAuthenticationToken- Returns:
- the
OAuth2DeviceVerificationEndpointConfigurerfor further configuration
-
errorResponseHandler
public OAuth2DeviceVerificationEndpointConfigurer errorResponseHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler errorResponseHandler) Sets theAuthenticationFailureHandlerused for handling anOAuth2AuthenticationExceptionand returning theError Response.- Parameters:
errorResponseHandler- theAuthenticationFailureHandlerused for handling anOAuth2AuthenticationException- Returns:
- the
OAuth2DeviceVerificationEndpointConfigurerfor further configuration
-
consentPage
Specify the URI to redirect Resource Owners to if consent is required during thedevice_codeflow. A default consent page will be generated when this attribute is not specified. If a URI is specified, applications are required to process the specified URI to generate a consent page. The query string will contain the following parameters:client_id- the client identifierscope- a space-delimited list of scopes present in the device authorization requeststate- a CSRF protection tokenuser_code- the user code
- It must be an HTTP POST
- It must be submitted to
AuthorizationServerSettings.getDeviceVerificationEndpoint() - It must include the received
client_idas an HTTP parameter - It must include the received
stateas an HTTP parameter - It must include the list of
scopes theResource Ownerconsented to as an HTTP parameter - It must include the received
user_codeas an HTTP parameter
- Parameters:
consentPage- the URI of the custom consent page to redirect to if consent is required (e.g. "/oauth2/consent")- Returns:
- the
OAuth2DeviceVerificationEndpointConfigurerfor further configuration
-
init
public void init(org.springframework.security.config.annotation.web.builders.HttpSecurity builder) -
configure
public void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity builder) -
postProcess
protected final <T> T postProcess(T object) -
getObjectPostProcessor
protected final org.springframework.security.config.annotation.ObjectPostProcessor<Object> getObjectPostProcessor()
-