Class OAuth2DeviceAuthorizationEndpointConfigurer
java.lang.Object
org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2DeviceAuthorizationEndpointConfigurer
Configurer for the OAuth 2.0 Device Authorization Endpoint.
- Since:
- 1.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionauthenticationProvider
(org.springframework.security.authentication.AuthenticationProvider authenticationProvider) Adds anAuthenticationProvider
used for authenticating anOAuth2DeviceAuthorizationRequestAuthenticationToken
.authenticationProviders
(Consumer<List<org.springframework.security.authentication.AuthenticationProvider>> authenticationProvidersConsumer) Sets theConsumer
providing access to theList
of default and (optionally) addedAuthenticationProvider
's allowing the ability to add, remove, or customize a specificAuthenticationProvider
.void
configure
(org.springframework.security.config.annotation.web.builders.HttpSecurity builder) deviceAuthorizationRequestConverter
(org.springframework.security.web.authentication.AuthenticationConverter deviceAuthorizationRequestConverter) Sets theAuthenticationConverter
used when attempting to extract a Device Authorization Request fromHttpServletRequest
to an instance ofOAuth2DeviceAuthorizationRequestAuthenticationToken
used for authenticating the request.deviceAuthorizationRequestConverters
(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> deviceAuthorizationRequestConvertersConsumer) Sets theConsumer
providing access to theList
of default and (optionally) addedAuthenticationConverter
's allowing the ability to add, remove, or customize a specificAuthenticationConverter
.deviceAuthorizationResponseHandler
(org.springframework.security.web.authentication.AuthenticationSuccessHandler deviceAuthorizationResponseHandler) Sets theAuthenticationSuccessHandler
used for handling anOAuth2DeviceAuthorizationRequestAuthenticationToken
and returning theDevice Authorization Response
.errorResponseHandler
(org.springframework.security.web.authentication.AuthenticationFailureHandler errorResponseHandler) Sets theAuthenticationFailureHandler
used for handling anOAuth2AuthenticationException
and returning theError Response
.protected final org.springframework.security.config.annotation.ObjectPostProcessor<Object>
void
init
(org.springframework.security.config.annotation.web.builders.HttpSecurity builder) protected final <T> T
postProcess
(T object) verificationUri
(String verificationUri) Sets the end-user verificationURI
on the authorization server.
-
Method Details
-
deviceAuthorizationRequestConverter
public OAuth2DeviceAuthorizationEndpointConfigurer deviceAuthorizationRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter deviceAuthorizationRequestConverter) Sets theAuthenticationConverter
used when attempting to extract a Device Authorization Request fromHttpServletRequest
to an instance ofOAuth2DeviceAuthorizationRequestAuthenticationToken
used for authenticating the request.- Parameters:
deviceAuthorizationRequestConverter
- theAuthenticationConverter
used when attempting to extract a Device Authorization Request fromHttpServletRequest
- Returns:
- the
OAuth2DeviceAuthorizationEndpointConfigurer
for further configuration
-
deviceAuthorizationRequestConverters
public OAuth2DeviceAuthorizationEndpointConfigurer deviceAuthorizationRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> deviceAuthorizationRequestConvertersConsumer) Sets theConsumer
providing access to theList
of default and (optionally) addedAuthenticationConverter
's allowing the ability to add, remove, or customize a specificAuthenticationConverter
.- Parameters:
deviceAuthorizationRequestConvertersConsumer
- theConsumer
providing access to theList
of default and (optionally) addedAuthenticationConverter
's- Returns:
- the
OAuth2DeviceAuthorizationEndpointConfigurer
for further configuration
-
authenticationProvider
public OAuth2DeviceAuthorizationEndpointConfigurer authenticationProvider(org.springframework.security.authentication.AuthenticationProvider authenticationProvider) Adds anAuthenticationProvider
used for authenticating anOAuth2DeviceAuthorizationRequestAuthenticationToken
.- Parameters:
authenticationProvider
- anAuthenticationProvider
used for authenticating anOAuth2DeviceAuthorizationRequestAuthenticationToken
- Returns:
- the
OAuth2DeviceAuthorizationEndpointConfigurer
for further configuration
-
authenticationProviders
public OAuth2DeviceAuthorizationEndpointConfigurer authenticationProviders(Consumer<List<org.springframework.security.authentication.AuthenticationProvider>> authenticationProvidersConsumer) Sets theConsumer
providing access to theList
of default and (optionally) addedAuthenticationProvider
's allowing the ability to add, remove, or customize a specificAuthenticationProvider
.- Parameters:
authenticationProvidersConsumer
- theConsumer
providing access to theList
of default and (optionally) addedAuthenticationProvider
's- Returns:
- the
OAuth2DeviceAuthorizationEndpointConfigurer
for further configuration
-
deviceAuthorizationResponseHandler
public OAuth2DeviceAuthorizationEndpointConfigurer deviceAuthorizationResponseHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler deviceAuthorizationResponseHandler) Sets theAuthenticationSuccessHandler
used for handling anOAuth2DeviceAuthorizationRequestAuthenticationToken
and returning theDevice Authorization Response
.- Parameters:
deviceAuthorizationResponseHandler
- theAuthenticationSuccessHandler
used for handling anOAuth2DeviceAuthorizationRequestAuthenticationToken
- Returns:
- the
OAuth2DeviceAuthorizationEndpointConfigurer
for further configuration
-
errorResponseHandler
public OAuth2DeviceAuthorizationEndpointConfigurer errorResponseHandler(org.springframework.security.web.authentication.AuthenticationFailureHandler errorResponseHandler) Sets theAuthenticationFailureHandler
used for handling anOAuth2AuthenticationException
and returning theError Response
.- Parameters:
errorResponseHandler
- theAuthenticationFailureHandler
used for handling anOAuth2AuthenticationException
- Returns:
- the
OAuth2DeviceAuthorizationEndpointConfigurer
for further configuration
-
verificationUri
Sets the end-user verificationURI
on the authorization server.- Parameters:
verificationUri
- the end-user verificationURI
on the authorization server- Returns:
- the
OAuth2DeviceAuthorizationEndpointConfigurer
for 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()
-