LDAP Classes
Implements Java LDAP

com.novell.ldap
Interface LDAPBindHandler

All Superinterfaces:
LDAPReferralHandler

public interface LDAPBindHandler
extends LDAPReferralHandler

Used to do explicit bind processing on a referral.

This interface allows a programmer to override the default authentication and reauthentication behavior when automatically following referrals and search references. It is used to control the authentication mechanism used on automatic referral following.

A client can specify an instance of this class to be used on a single operation (through the LDAPConstraints object) or for all operations (through the LDAPContraints object associated with the connection).

Sample Code: SearchUtil.java

See Also:
LDAPAuthHandler, LDAPConstraints.setReferralFollowing(boolean)

Method Summary
 LDAPConnection bind(java.lang.String[] ldapurl, LDAPConnection conn)
          Called by LDAPConnection when a referral is received.
 

Method Detail

bind

public LDAPConnection bind(java.lang.String[] ldapurl,
                           LDAPConnection conn)
                    throws LDAPReferralException
Called by LDAPConnection when a referral is received.

This method has the responsibility to bind to one of the hosts in the list specified by the ldaprul parameter which corresponds exactly to the list of hosts returned in a single referral response. An implementation may access the host, port, credentials, and other information in the original LDAPConnection object to decide on an appropriate authentication mechanism, and/or interact with a user or external module. The object implementing LDAPBind creates a new LDAPConnection object to perform its connect and bind calls. It returns the new connection when both the connect and bind operations succeed on one host from the list. The LDAPConnection object referral following code uses the new LDAPConnection object when it resends the search request, updated with the new search base and possible search filter. An LDAPException is thrown on failure, as in the LDAPConnection.bind method.

Parameters:
ldapurl - The list of servers contained in a referral response.
conn - An established connection to an LDAP server.
Returns:
An established connection to one of the ldap servers in the referral list.
Throws:
LDAPReferralException - An LDAPreferralException is thrown with appropriate fields set to give the reason for the failure.

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000