Class GroovyUserDetailsAuthenticationProvider

java.lang.Object
org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
com.avoka.fc.core.security.GroovyUserDetailsAuthenticationProvider
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 GroovyUserDetailsAuthenticationProvider extends org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider implements IAuthenticationProviderAware, IPortalAware
Provides a Groovy script based UserDetails Authentication Provider class.
Since:
3.5.0
  • Field Summary

    Fields inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider

    hideUserNotFoundExceptions, logger, messages
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a GroovyUserDetailsAuthenticationProvider and initialize the default properties.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)
    This method does nothing.
    Return the retrieve AccountUserDetails Groovy script.
    Return the authentication details provider name.
    boolean
    Deprecated. 
    protected org.springframework.security.core.userdetails.UserDetails
    retrieveUser(String username, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)
    Retrieve the AccountUserDetails object for the specified user name and authentication token.
    void
    Set the Authentication Provider.
    void
    setGroovyScript(String groovyScript)
    Set the retrieve AccountUserDetails Groovy script.
    void
    setGroovyTypeChecked(boolean typeChecked)
    Deprecated. 
    void
    Set the authentication details provider name.
    void
    setPortal(Portal portal)
    Set the execution context portal.
    void
    Deprecated.
    - this security manager is resolved from the current 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GroovyUserDetailsAuthenticationProvider

      public GroovyUserDetailsAuthenticationProvider()
      Create a GroovyUserDetailsAuthenticationProvider and initialize the default properties.
  • Method Details

    • getName

      public String getName()
      Return the authentication details provider name.
      Returns:
      the authentication details provider name.
      Since:
      4.1.3
    • setName

      public void setName(String name)
      Set the authentication details provider name.
      Parameters:
      name - the authentication details provider name
      Since:
      4.1.3
    • setAuthenticationProvider

      public void setAuthenticationProvider(AuthenticationProvider authenticationProvider)
      Set the Authentication Provider.
      Specified by:
      setAuthenticationProvider in interface IAuthenticationProviderAware
      Parameters:
      authenticationProvider - the AuthenticationProvider
      Since:
      4.2.0
    • getGroovyScript

      public String getGroovyScript()
      Return the retrieve AccountUserDetails Groovy script.
      Returns:
      the retrieve AccountUserDetails Groovy script
    • setGroovyScript

      public void setGroovyScript(String groovyScript)
      Set the retrieve AccountUserDetails Groovy script.
      Parameters:
      groovyScript - the retrieve AccountUserDetails Groovy script
    • isGroovyTypeChecked

      @Deprecated public boolean isGroovyTypeChecked()
      Deprecated.
      Returns:
      false
    • setGroovyTypeChecked

      @Deprecated public void setGroovyTypeChecked(boolean typeChecked)
      Deprecated.
      Parameters:
      typeChecked - does nothing
    • setPortal

      public void setPortal(Portal portal)
      Set the execution context portal.
      Specified by:
      setPortal in interface IPortalAware
      Parameters:
      portal - the execution context portal
      Since:
      4.1.0
      See Also:
    • setSecurityManager

      @Deprecated public void setSecurityManager(SecurityManager securityManager)
      Deprecated.
      - this security manager is resolved from the current portal
      This method does nothing.
      Parameters:
      securityManager - the parent security manager
      Since:
      4.1.0
      See Also:
    • 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:
      retrieveUser in class org.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.AuthenticationException
      This method does nothing.
      Specified by:
      additionalAuthenticationChecks in class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
      Throws:
      org.springframework.security.core.AuthenticationException
      See Also:
      • AbstractUserDetailsAuthenticationProvider#additionalAuthenticationChecks(String, UsernamePasswordAuthenticationToken)