Package com.avoka.fc.core.security
Class FluentUserAuthenticationProvider
- java.lang.Object
-
- org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
-
- com.avoka.fc.core.security.FluentUserAuthenticationProvider
-
- All Implemented Interfaces:
IAuthenticationProviderAware,IPortalAware,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.MessageSourceAware,org.springframework.security.authentication.AuthenticationProvider
public class FluentUserAuthenticationProvider extends org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider implements IAuthenticationProviderAware, IPortalAware
Provides a Fluent script based User Authentication Provider class.- Since:
- 19.11.0
-
-
Constructor Summary
Constructors Constructor Description FluentUserAuthenticationProvider()Create a GroovyUserDetailsAuthenticationProvider and initialize the default properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadditionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)This method does nothing.StringgetGroovyScript()Return the retrieve AccountUserDetails Fluent Groovy script.StringgetName()Return the authentication details provider name.protected org.springframework.security.core.userdetails.UserDetailsretrieveUser(String username, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)Retrieve the AccountUserDetails object for the specified user name and authentication token.voidsetAuthenticationProvider(AuthenticationProvider authenticationProvider)Set the Authentication Provider.voidsetGroovyScript(String groovyScript)Set the retrieve AccountUserDetails Fluent Groovy script.voidsetName(String name)Set the authentication details provider name.voidsetPortal(Portal portal)Set the execution context portal.-
Methods inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
afterPropertiesSet, authenticate, createSuccessAuthentication, doAfterPropertiesSet, getPostAuthenticationChecks, getPreAuthenticationChecks, getUserCache, isForcePrincipalAsString, isHideUserNotFoundExceptions, setAuthoritiesMapper, setForcePrincipalAsString, setHideUserNotFoundExceptions, setMessageSource, setPostAuthenticationChecks, setPreAuthenticationChecks, setUserCache, supports
-
-
-
-
Method Detail
-
getName
public String getName()
Return the authentication details provider name.- Returns:
- the authentication details provider name.
-
setName
public void setName(String name)
Set the authentication details provider name.- Parameters:
name- the authentication details provider name
-
setAuthenticationProvider
public void setAuthenticationProvider(AuthenticationProvider authenticationProvider)
Set the Authentication Provider.- Specified by:
setAuthenticationProviderin interfaceIAuthenticationProviderAware- Parameters:
authenticationProvider- the AuthenticationProvider
-
getGroovyScript
public String getGroovyScript()
Return the retrieve AccountUserDetails Fluent Groovy script.- Returns:
- the retrieve AccountUserDetails Fluent Groovy script
-
setGroovyScript
public void setGroovyScript(String groovyScript)
Set the retrieve AccountUserDetails Fluent Groovy script.- Parameters:
groovyScript- the retrieve AccountUserDetails Fluent Groovy script
-
setPortal
public void setPortal(Portal portal)
Set the execution context portal.- Specified by:
setPortalin interfaceIPortalAware- Parameters:
portal- the execution context portal- See Also:
IPortalAware.setPortal(Portal)
-
retrieveUser
protected org.springframework.security.core.userdetails.UserDetails retrieveUser(String username, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication) throws org.springframework.security.core.AuthenticationException
Retrieve the AccountUserDetails object for the specified user name and authentication token. Typically this method may:- successfully perform authentication of an existing, returning a AccountUserDetails object
- successfully perform authentication creating an new account, returning a AccountUserDetails object
- failed authentication of an existing user, returning a BadCredentialsException
- failed authentication with not user found, returning a UsernameNotFoundException
- found user account is not associated with Portal, returning a NotPortalAccountException
- found user account is not active, returning a AccountNotActiveException
- Specified by:
retrieveUserin classorg.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException- See Also:
AbstractUserDetailsAuthenticationProvider.retrieveUser(String, UsernamePasswordAuthenticationToken)
-
additionalAuthenticationChecks
protected void additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication) throws org.springframework.security.core.AuthenticationExceptionThis method does nothing.- Specified by:
additionalAuthenticationChecksin classorg.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException- See Also:
AbstractUserDetailsAuthenticationProvider#additionalAuthenticationChecks(String, UsernamePasswordAuthenticationToken)
-
-