Class OAuth2DeviceAuthorizationRequestAuthenticationProvider
java.lang.Object
org.springframework.security.oauth2.server.authorization.authentication.OAuth2DeviceAuthorizationRequestAuthenticationProvider
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
public final class OAuth2DeviceAuthorizationRequestAuthenticationProvider
extends Object
implements org.springframework.security.authentication.AuthenticationProvider
An
AuthenticationProvider implementation for the Device Authorization Request
used in the OAuth 2.0 Device Authorization Grant.- Since:
- 1.1
- See Also:
-
OAuth2DeviceAuthorizationRequestAuthenticationTokenOAuth2DeviceVerificationAuthenticationProviderOAuth2DeviceAuthorizationConsentAuthenticationProviderOAuth2DeviceCodeAuthenticationProviderOAuth2AuthorizationServiceOAuth2TokenGenerator- OAuth 2.0 Device Authorization Grant
- Section 3.1 Device Authorization Request
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2DeviceAuthorizationRequestAuthenticationProvider(OAuth2AuthorizationService authorizationService) Constructs anOAuth2DeviceAuthorizationRequestAuthenticationProviderusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) voidsetDeviceCodeGenerator(OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2DeviceCode> deviceCodeGenerator) Sets theOAuth2TokenGeneratorthat generates theOAuth2DeviceCode.voidsetUserCodeGenerator(OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2UserCode> userCodeGenerator) Sets theOAuth2TokenGeneratorthat generates theOAuth2UserCode.boolean
-
Constructor Details
-
OAuth2DeviceAuthorizationRequestAuthenticationProvider
public OAuth2DeviceAuthorizationRequestAuthenticationProvider(OAuth2AuthorizationService authorizationService) Constructs anOAuth2DeviceAuthorizationRequestAuthenticationProviderusing the provided parameters.- Parameters:
authorizationService- the authorization service
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
supports
- Specified by:
supportsin interfaceorg.springframework.security.authentication.AuthenticationProvider
-
setDeviceCodeGenerator
public void setDeviceCodeGenerator(OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2DeviceCode> deviceCodeGenerator) Sets theOAuth2TokenGeneratorthat generates theOAuth2DeviceCode.- Parameters:
deviceCodeGenerator- theOAuth2TokenGeneratorthat generates theOAuth2DeviceCode
-
setUserCodeGenerator
public void setUserCodeGenerator(OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2UserCode> userCodeGenerator) Sets theOAuth2TokenGeneratorthat generates theOAuth2UserCode.- Parameters:
userCodeGenerator- theOAuth2TokenGeneratorthat generates theOAuth2UserCode
-