Directory SDK
for Java 4.19

netscape.ldap
Class LDAPRebindAuth

java.lang.Object
  extended bynetscape.ldap.LDAPRebindAuth
All Implemented Interfaces:
Serializable

public class LDAPRebindAuth
extends Object
implements Serializable

Represents information used to authenticate the client in cases where the client follows referrals automatically. If you are defining a class that implements the LDAPRebind interface, your implementation of the LDAPRebind.getRebindAuthentication method needs to construct and return an object of this class.

For example, the following method sets up authentication information based on the LDAP server identified in the referral. Ideally, this method would be defined as part of a class implementing the LDAPRebind interface.

 private String myDN = "cn=myApp,ou=Directory Apps";
 private String myPW = "n3v3rgU355";
 private LDAPRebindAuth myRebindInfo;
 ...
 public LDAPRebindAuth getRebindAuthentication( String host, int port ) {
  if ( host.equalsIgnoreCase( "ds.example.com" ) && ( port == 389 ) ) {
      myRebindInfo = new LDAPRebindAuth( myDN, myPW );
  } else {
      myRebindInfo = new LDAPRebindAuth( "", "" );
  }
  return myRebindInfo;
 } 

See Also:
LDAPRebind, Serialized Form

Constructor Summary
LDAPRebindAuth(String dn, String password)
          Constructs information that is used by the client for authentication when following referrals automatically.
 
Method Summary
 String getDN()
          Returns the distinguished name to be used for reauthentication, if the client is set up to follow referrals automatically.
 String getPassword()
          Returns the password to be used for reauthentication, if the client is set up to follow referrals automatically.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPRebindAuth

public LDAPRebindAuth(String dn,
                      String password)
Constructs information that is used by the client for authentication when following referrals automatically.

Parameters:
dn - distinguished name to use for authenticating to the LDAP server during an automatic referral (if the client is set up to follow referrals automatically)
password - password to use for authenticating to the LDAP server during an automatic referral (if the client is set up to follow referrals automatically)
Method Detail

getDN

public String getDN()
Returns the distinguished name to be used for reauthentication, if the client is set up to follow referrals automatically.

Returns:
distinguished name to use when authenticating to other LDAP servers during referrals.

getPassword

public String getPassword()
Returns the password to be used for reauthentication, if the client is set up to follow referrals automatically.

Returns:
password to use when authenticating to other LDAP servers during referrals.

Directory SDK
for Java 4.19

Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.