Class EmbeddedLoginTokenAuthenticationProvider

  • All Implemented Interfaces:
    org.springframework.security.authentication.AuthenticationProvider

    public class EmbeddedLoginTokenAuthenticationProvider
    extends Object
    implements org.springframework.security.authentication.AuthenticationProvider
    Authenticates the user for the TokenEndpoint based on a one-time passcode parameter.
    Author:
    Cade Rea (cade-rea)
    • Method Detail

      • 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
      • buildOAuth2Request

        protected org.springframework.security.oauth2.provider.OAuth2Request buildOAuth2Request​(String clientId,
                                                                                                OAuth2UserDetails userDetails,
                                                                                                String scope)
        Build a synthetic OAuth2Request. This is needed to issue tokens from the TokenEndpoint.
        Parameters:
        clientId - The client_id from the request.
        userDetails - The UserDetails for the authenticated User.
        scope - The requested scopes.
        Returns:
        An approved OAuth2Request.
      • supports

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