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 inuserNameFormatif set, or calls theLDAPNameResolverotherwise.- Author:
- Andy Hind
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.security.authentication.AuthenticationComponent
AuthenticationComponent.UserNameValidationMode
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
logger
-
-
Constructor Summary
Constructors Constructor Description LDAPAuthenticationComponentImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()protected voidauthenticateImpl(java.lang.String userName, char[] password)Implement the authentication methodprotected booleanimplementationAllowsGuestLogin()booleanisActive()Determines whether this bean is active.voidsetActive(boolean active)voidsetEscapeCommasInBind(boolean escapeCommasInBind)voidsetEscapeCommasInUid(boolean escapeCommasInUid)voidsetId(java.lang.String id)Set the unique name of this ldap authentication component e.g.voidsetLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)voidsetLdapNameResolver(LDAPNameResolver ldapNameResolver)voidsetUserNameFormat(java.lang.String userNameFormat)-
Methods inherited from class org.alfresco.repo.security.authentication.AbstractAuthenticationComponent
authenticate, clearCurrentSecurityContext, getAllowGuestLogin, getCurrentAuthentication, getCurrentUserName, getDefaultAdministratorUserNames, getDefaultGuestUserNames, getGuestUserName, getGuestUserName, getNodeService, getNumberFailedAuthentications, getNumberSuccessfulAuthentications, getPersonService, getSystemUserName, getSystemUserName, getTransactionService, getUserDetails, getUserDomain, guestUserAuthenticationAllowed, isCurrentUserTheSystemUser, isGuestUserName, isSystemUserName, onAuthenticate, onFail, setAllowGuestLogin, setAuthenticationContext, setCurrentAuthentication, setCurrentUser, setCurrentUser, setDefaultAdministratorUserNameList, setDefaultAdministratorUserNames, setDefaultGuestUserNameList, setDefaultGuestUserNames, setGuestUserAsCurrentUser, setNodeService, setPersonService, setSystemUserAsCurrentUser, setSystemUserAsCurrentUser, setTransactionService, setUserDetails, setUserRegistrySynchronizer
-
-
-
-
Method Detail
-
setLDAPInitialDirContextFactory
public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)
-
setUserNameFormat
public void setUserNameFormat(java.lang.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:ActivateableBeanDetermines whether this bean is active.- Specified by:
isActivein interfaceActivateableBean- Returns:
trueif this bean is active
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception
-
authenticateImpl
protected void authenticateImpl(java.lang.String userName, char[] password) throws org.alfresco.repo.security.authentication.AuthenticationExceptionImplement the authentication method- Overrides:
authenticateImplin classAbstractAuthenticationComponent- Parameters:
userName- Stringpassword- char[]- Throws:
org.alfresco.repo.security.authentication.AuthenticationException
-
implementationAllowsGuestLogin
protected boolean implementationAllowsGuestLogin()
- Specified by:
implementationAllowsGuestLoginin classAbstractAuthenticationComponent
-
setId
public void setId(java.lang.String id)
Set the unique name of this ldap authentication component e.g. "managed,ldap1"- Parameters:
id- String
-
-