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:
  • Constructor Details

    • OAuth2DeviceAuthorizationRequestAuthenticationProvider

      public OAuth2DeviceAuthorizationRequestAuthenticationProvider(OAuth2AuthorizationService authorizationService)
      Constructs an OAuth2DeviceAuthorizationRequestAuthenticationProvider using 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:
      authenticate in interface org.springframework.security.authentication.AuthenticationProvider
      Throws:
      org.springframework.security.core.AuthenticationException
    • supports

      public boolean supports(Class<?> authentication)
      Specified by:
      supports in interface org.springframework.security.authentication.AuthenticationProvider
    • setDeviceCodeGenerator

      public void setDeviceCodeGenerator(OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2DeviceCode> deviceCodeGenerator)
      Sets the OAuth2TokenGenerator that generates the OAuth2DeviceCode.
      Parameters:
      deviceCodeGenerator - the OAuth2TokenGenerator that generates the OAuth2DeviceCode
    • setUserCodeGenerator

      public void setUserCodeGenerator(OAuth2TokenGenerator<org.springframework.security.oauth2.core.OAuth2UserCode> userCodeGenerator)
      Sets the OAuth2TokenGenerator that generates the OAuth2UserCode.
      Parameters:
      userCodeGenerator - the OAuth2TokenGenerator that generates the OAuth2UserCode