Class BindAuthenticator
java.lang.Object
org.springframework.security.ldap.authentication.AbstractLdapAuthenticator
org.springframework.security.ldap.authentication.BindAuthenticator
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.MessageSourceAware
,LdapAuthenticator
An authenticator which binds as a user.
- See Also:
-
Field Summary
Fields inherited from class org.springframework.security.ldap.authentication.AbstractLdapAuthenticator
messages
-
Constructor Summary
ConstructorDescriptionBindAuthenticator
(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource) Create an initialized instance using theBaseLdapPathContextSource
provided. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.ldap.core.DirContextOperations
authenticate
(Authentication authentication) Authenticates as a user and obtains additional user information from the directory.protected void
handleBindException
(String userDn, String username, Throwable cause) Allows subclasses to inspect the exception thrown by an attempt to bind with a particular DN.Methods inherited from class org.springframework.security.ldap.authentication.AbstractLdapAuthenticator
afterPropertiesSet, getContextSource, getUserAttributes, getUserDns, getUserSearch, setMessageSource, setUserAttributes, setUserDnPatterns, setUserSearch
-
Constructor Details
-
BindAuthenticator
public BindAuthenticator(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource) Create an initialized instance using theBaseLdapPathContextSource
provided.- Parameters:
contextSource
- the BaseLdapPathContextSource instance against which bind operations will be performed.
-
-
Method Details
-
authenticate
public org.springframework.ldap.core.DirContextOperations authenticate(Authentication authentication) Description copied from interface:LdapAuthenticator
Authenticates as a user and obtains additional user information from the directory.- Returns:
- the details of the successfully authenticated user.
-
handleBindException
Allows subclasses to inspect the exception thrown by an attempt to bind with a particular DN. The default implementation just reports the failure to the debug logger.
-