org.acegisecurity.providers.ldap.authenticator
Class AbstractLdapAuthenticator
java.lang.Object
org.acegisecurity.providers.ldap.authenticator.AbstractLdapAuthenticator
- All Implemented Interfaces:
- LdapAuthenticator, InitializingBean, MessageSourceAware
- Direct Known Subclasses:
- BindAuthenticator, PasswordComparisonAuthenticator
public abstract class AbstractLdapAuthenticator
- extends Object
- implements LdapAuthenticator, InitializingBean, MessageSourceAware
Base class for the authenticator implementations.
- Version:
- $Id: AbstractLdapAuthenticator.java 1498 2006-05-26 22:48:21Z luke_t $
- Author:
- Luke Taylor
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
messages
protected MessageSourceAccessor messages
AbstractLdapAuthenticator
protected AbstractLdapAuthenticator(InitialDirContextFactory initialDirContextFactory)
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface InitializingBean
- Throws:
Exception
getInitialDirContextFactory
protected InitialDirContextFactory getInitialDirContextFactory()
getUserAttributes
public String[] getUserAttributes()
getUserDetailsMapper
protected LdapEntryMapper getUserDetailsMapper()
getUserDns
protected List getUserDns(String username)
- Builds list of possible DNs for the user, worked out from the userDnPatterns property. The
returned value includes the root DN of the provider URL used to configure the
InitialDirContextfactory.
- Parameters:
username - the user's login name
- Returns:
- the list of possible DN matches, empty if userDnPatterns wasn't set.
getUserSearch
protected LdapUserSearch getUserSearch()
setMessageSource
public void setMessageSource(MessageSource messageSource)
- Specified by:
setMessageSource in interface MessageSourceAware
setUserAttributes
public void setUserAttributes(String[] userAttributes)
- Sets the user attributes which will be retrieved from the directory.
- Parameters:
userAttributes -
setUserDetailsMapper
public void setUserDetailsMapper(LdapUserDetailsMapper userDetailsMapper)
setUserDnPatterns
public void setUserDnPatterns(String[] dnPattern)
- Sets the pattern which will be used to supply a DN for the user. The pattern should be the name relative
to the root DN. The pattern argument {0} will contain the username. An example would be "cn={0},ou=people".
- Parameters:
dnPattern - the array of patterns which will be tried when obtaining a username
to a DN.
setUserSearch
public void setUserSearch(LdapUserSearch userSearch)
Copyright © 2004-2006 Acegi Technology Pty Limited. All Rights Reserved.