netscape.ldap
Class LDAPRebindAuth
java.lang.Object
|
+--netscape.ldap.LDAPRebindAuth
- public class LDAPRebindAuth
- extends java.lang.Object
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=Directory Manager,o=Ace Industry,c=US";
private String myPW = "alway4444";
private LDAPRebindAuth myRebindInfo;
...
public LDAPRebindAuth getRebindAuthentication( String host, int port ) {
if ( host.equalsIgnoreCase( "alway.mcom.com" ) && ( port == 389 ) ) {
myRebindInfo = new LDAPRebindAuth( myDN, myPW );
} else {
myRebindInfo = new LDAPRebindAuth( "", "" );
}
return myRebindInfo;
}
- See Also:
LDAPRebind
Constructor Summary |
LDAPRebindAuth(java.lang.String dn,
java.lang.String password)
Constructs information that is used by the client
for authentication when following referrals automatically. |
Method Summary |
java.lang.String |
getDN()
Returns the distinguished name to be used for reauthentication,
if the client is set up to follow referrals automatically. |
java.lang.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 |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
LDAPRebindAuth
public LDAPRebindAuth(java.lang.String dn,
java.lang.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)
getDN
public java.lang.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 java.lang.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.