Class EmbeddedLoginTokenAuthenticationProvider
- java.lang.Object
- 
- com.broadleafcommerce.auth.user.session.embedded.EmbeddedLoginTokenAuthenticationProvider
 
- 
- All Implemented Interfaces:
- org.springframework.security.authentication.AuthenticationProvider
 
 public class EmbeddedLoginTokenAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider Authenticates the user for theTokenEndpointbased on a one-time passcode parameter.- Author:
- Cade Rea (cade-rea)
 
- 
- 
Constructor SummaryConstructors Constructor Description EmbeddedLoginTokenAuthenticationProvider(OAuth2UserDetailsService userDetailsService, PasscodeService<PasswordToken,User> passcodeService, UserService<User> userService)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication)protected EmbeddedLoginTokenEndpointAuthenticationTokenbuildEmbeddedLoginTokenEndpointAuthenticationToken(OAuth2UserDetails userDetails, String clientId, String username, String scope, String code, String purpose)protected org.springframework.security.oauth2.provider.OAuth2RequestbuildOAuth2Request(String clientId, OAuth2UserDetails userDetails, String scope)Build a syntheticOAuth2Request.protected PasscodeService<PasswordToken,User>getPasscodeService()protected OAuth2UserDetailsServicegetUserDetailsService()protected UserService<User>getUserService()booleansupports(Class<?> authentication)
 
- 
- 
- 
Constructor Detail- 
EmbeddedLoginTokenAuthenticationProviderpublic EmbeddedLoginTokenAuthenticationProvider(OAuth2UserDetailsService userDetailsService, PasscodeService<PasswordToken,User> passcodeService, UserService<User> userService) 
 
- 
 - 
Method Detail- 
authenticatepublic org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException- Specified by:
- authenticatein interface- org.springframework.security.authentication.AuthenticationProvider
- Throws:
- org.springframework.security.core.AuthenticationException
 
 - 
buildEmbeddedLoginTokenEndpointAuthenticationTokenprotected EmbeddedLoginTokenEndpointAuthenticationToken buildEmbeddedLoginTokenEndpointAuthenticationToken(OAuth2UserDetails userDetails, String clientId, String username, String scope, String code, String purpose) - Parameters:
- userDetails- The- UserDetailsfor the authenticated User.
- clientId- The client_id from the request.
- username- The username of the authenticated User.
- scope- The requested scopes.
- code- The one-time passcode used for authentication.
- purpose- The purpose of the one-time passcode used for authentication.
- Returns:
- An authenticated EmbeddedLoginTokenEndpointAuthenticationToken.
 
 - 
buildOAuth2Requestprotected org.springframework.security.oauth2.provider.OAuth2Request buildOAuth2Request(String clientId, OAuth2UserDetails userDetails, String scope) Build a syntheticOAuth2Request. This is needed to issue tokens from theTokenEndpoint.- Parameters:
- clientId- The client_id from the request.
- userDetails- The- UserDetailsfor the authenticated User.
- scope- The requested scopes.
- Returns:
- An approved OAuth2Request.
 
 - 
supportspublic boolean supports(Class<?> authentication) - Specified by:
- supportsin interface- org.springframework.security.authentication.AuthenticationProvider
 
 - 
getPasscodeServiceprotected PasscodeService<PasswordToken,User> getPasscodeService() 
 - 
getUserDetailsServiceprotected OAuth2UserDetailsService getUserDetailsService() 
 - 
getUserServiceprotected UserService<User> getUserService() 
 
- 
 
-