public abstract class AbstractLdapAuthenticator extends Object implements LdapAuthenticator, InitializingBean, MessageSourceAware
Modifier and Type | Field and Description |
---|---|
protected MessageSourceAccessor |
messages |
Constructor and Description |
---|
AbstractLdapAuthenticator(ContextSource contextSource)
Create an initialized instance with the
ContextSource provided. |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected ContextSource |
getContextSource() |
String[] |
getUserAttributes() |
protected List<String> |
getUserDns(String username)
Builds list of possible DNs for the user, worked out from the userDnPatterns property.
|
protected LdapUserSearch |
getUserSearch() |
void |
setMessageSource(MessageSource messageSource) |
void |
setUserAttributes(String[] userAttributes)
Sets the user attributes which will be retrieved from the directory.
|
void |
setUserDnPatterns(String[] dnPattern)
Sets the pattern which will be used to supply a DN for the user.
|
void |
setUserSearch(LdapUserSearch userSearch) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
authenticate
protected MessageSourceAccessor messages
public AbstractLdapAuthenticator(ContextSource contextSource)
ContextSource
provided.contextSource
- public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected ContextSource getContextSource()
public String[] getUserAttributes()
protected List<String> getUserDns(String username)
username
- the user's login nameprotected LdapUserSearch getUserSearch()
public void setMessageSource(MessageSource messageSource)
setMessageSource
in interface MessageSourceAware
public void setUserAttributes(String[] userAttributes)
userAttributes
- public void setUserDnPatterns(String[] dnPattern)
dnPattern
- the array of patterns which will be tried when converting a username to a DN.public void setUserSearch(LdapUserSearch userSearch)