Class LDAPAuthenticationComponentImpl

java.lang.Object
org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl
All Implemented Interfaces:
ActivateableBean, AuthenticationComponent, AuthenticationContext, org.springframework.beans.factory.InitializingBean

public class LDAPAuthenticationComponentImpl extends AbstractAuthenticationComponent implements org.springframework.beans.factory.InitializingBean, ActivateableBean
Authenticates a user by LDAP. To convert the user name to an LDAP DN, it uses the fixed format in userNameFormat if set, or calls the LDAPNameResolver otherwise.
Author:
Andy Hind
  • Constructor Details

    • LDAPAuthenticationComponentImpl

      public LDAPAuthenticationComponentImpl()
  • Method Details

    • setLDAPInitialDirContextFactory

      public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)
    • setUserNameFormat

      public void setUserNameFormat(String userNameFormat)
    • setLdapNameResolver

      public void setLdapNameResolver(LDAPNameResolver ldapNameResolver)
    • setEscapeCommasInBind

      public void setEscapeCommasInBind(boolean escapeCommasInBind)
    • setEscapeCommasInUid

      public void setEscapeCommasInUid(boolean escapeCommasInUid)
    • setActive

      public void setActive(boolean active)
    • isActive

      public boolean isActive()
      Description copied from interface: ActivateableBean
      Determines whether this bean is active.
      Specified by:
      isActive in interface ActivateableBean
      Returns:
      true if this bean is active
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • authenticateImpl

      protected void authenticateImpl(String userName, char[] password) throws AuthenticationException
      Implement the authentication method
      Overrides:
      authenticateImpl in class AbstractAuthenticationComponent
      Parameters:
      userName - String
      password - char[]
      Throws:
      AuthenticationException
    • implementationAllowsGuestLogin

      protected boolean implementationAllowsGuestLogin()
      Specified by:
      implementationAllowsGuestLogin in class AbstractAuthenticationComponent
    • setId

      public void setId(String id)
      Set the unique name of this ldap authentication component e.g. "managed,ldap1"
      Parameters:
      id - String