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
-
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidauthenticateImpl(String userName, char[] password) Implement the authentication methodprotected booleanbooleanisActive()Determines whether this bean is active.voidsetActive(boolean active) voidsetEscapeCommasInBind(boolean escapeCommasInBind) voidsetEscapeCommasInUid(boolean escapeCommasInUid) voidSet the unique name of this ldap authentication component e.g.voidsetLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory) voidsetLdapNameResolver(LDAPNameResolver ldapNameResolver) voidsetUserNameFormat(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
-
Constructor Details
-
LDAPAuthenticationComponentImpl
public LDAPAuthenticationComponentImpl()
-
-
Method Details
-
setLDAPInitialDirContextFactory
public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory) -
setUserNameFormat
-
setLdapNameResolver
-
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
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
authenticateImpl
Implement the authentication method- Overrides:
authenticateImplin classAbstractAuthenticationComponent- Parameters:
userName- Stringpassword- char[]- Throws:
AuthenticationException
-
implementationAllowsGuestLogin
protected boolean implementationAllowsGuestLogin()- Specified by:
implementationAllowsGuestLoginin classAbstractAuthenticationComponent
-
setId
Set the unique name of this ldap authentication component e.g. "managed,ldap1"- Parameters:
id- String
-