Spring Security Framework

org.springframework.security.providers.ldap.authenticator
Class BindAuthenticator

java.lang.Object
  extended by org.springframework.security.providers.ldap.authenticator.AbstractLdapAuthenticator
      extended by org.springframework.security.providers.ldap.authenticator.BindAuthenticator
All Implemented Interfaces:
InitializingBean, MessageSourceAware, LdapAuthenticator
Direct Known Subclasses:
NtlmAwareLdapAuthenticator

public class BindAuthenticator
extends AbstractLdapAuthenticator

An authenticator which binds as a user.

Version:
$Id$
Author:
Luke Taylor
See Also:
AbstractLdapAuthenticator

Field Summary
 
Fields inherited from class org.springframework.security.providers.ldap.authenticator.AbstractLdapAuthenticator
messages
 
Constructor Summary
BindAuthenticator(SpringSecurityContextSource contextSource)
          Create an initialized instance using the SpringSecurityContextSource provided.
 
Method Summary
 org.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.providers.ldap.authenticator.AbstractLdapAuthenticator
afterPropertiesSet, getContextSource, getUserAttributes, getUserDns, getUserSearch, setMessageSource, setUserAttributes, setUserDnPatterns, setUserSearch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindAuthenticator

public BindAuthenticator(SpringSecurityContextSource contextSource)
Create an initialized instance using the SpringSecurityContextSource provided.

Parameters:
contextSource - the SpringSecurityContextSource instance against which bind operations will be performed.
Method Detail

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

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. The default implementation just reports the failure to the debug log.


Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.