Class EmbeddedLoginAuthenticationProvider
java.lang.Object
org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
com.broadleafcommerce.auth.user.session.FormLoginAuthenticationProvider
com.broadleafcommerce.auth.authorization.security.embedded.login.EmbeddedLoginAuthenticationProvider
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.MessageSourceAware
,org.springframework.security.authentication.AuthenticationProvider
An
AuthenticationProvider
that retrieves OAuth2UserDetails
from a
OAuth2UserDetailsService
for use with embedded login.- Author:
- Nathan Moore (nathandmoore)
- See Also:
-
Field Summary
Fields inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
hideUserNotFoundExceptions, logger, messages
-
Constructor Summary
ConstructorDescriptionEmbeddedLoginAuthenticationProvider
(OAuth2UserDetailsService userDetailsService, org.springframework.security.core.userdetails.UserDetailsPasswordService userDetailsPasswordService, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.security.core.Authentication
createSuccessAuthentication
(Object principal, org.springframework.security.core.Authentication authentication, org.springframework.security.core.userdetails.UserDetails user) Convert theFormLoginAuthenticationToken
from the super class to anEmbeddedLoginAuthenticationToken
.boolean
Methods inherited from class com.broadleafcommerce.auth.user.session.FormLoginAuthenticationProvider
additionalAuthenticationChecks, getPasswordEncoder, getUserDetailsPasswordService, getUserDetailsService, getUserNotFoundEncodedPassword, retrieveUser
Methods inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
afterPropertiesSet, authenticate, doAfterPropertiesSet, getPostAuthenticationChecks, getPreAuthenticationChecks, getUserCache, isForcePrincipalAsString, isHideUserNotFoundExceptions, setAuthoritiesMapper, setForcePrincipalAsString, setHideUserNotFoundExceptions, setMessageSource, setPostAuthenticationChecks, setPreAuthenticationChecks, setUserCache
-
Constructor Details
-
EmbeddedLoginAuthenticationProvider
public EmbeddedLoginAuthenticationProvider(OAuth2UserDetailsService userDetailsService, org.springframework.security.core.userdetails.UserDetailsPasswordService userDetailsPasswordService, org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
-
-
Method Details
-
supports
- Specified by:
supports
in interfaceorg.springframework.security.authentication.AuthenticationProvider
- Overrides:
supports
in classFormLoginAuthenticationProvider
-
createSuccessAuthentication
protected org.springframework.security.core.Authentication createSuccessAuthentication(Object principal, org.springframework.security.core.Authentication authentication, org.springframework.security.core.userdetails.UserDetails user) Convert theFormLoginAuthenticationToken
from the super class to anEmbeddedLoginAuthenticationToken
.- Overrides:
createSuccessAuthentication
in classFormLoginAuthenticationProvider
- Parameters:
principal
- that should be the principal in the returned object (defined by theAbstractUserDetailsAuthenticationProvider.isForcePrincipalAsString()
method)authentication
- that was presented to the provider for validationuser
- that was loaded by the implementation- Returns:
- The
EmbeddedLoginAuthenticationToken
representing this successful authentication.
-