tyrex.security.ldap
Class LDAPCredentials

java.lang.Object
  extended bytyrex.security.ldap.LDAPCredentials
All Implemented Interfaces:
javax.security.auth.Destroyable

public final class LDAPCredentials
extends java.lang.Object
implements javax.security.auth.Destroyable

Credentials for LDAP authentication. Can be used to authenticate an LDAP connection. The LDAP URL can be used to specify the LDAP server (host and port) for which these credentials apply.

The password is stored as an array of characters to prevent string interning and allow it to be destroyed. LDAP credentials are considered private.

Version:
$Revision: 1.4 $ $Date: 2001/03/12 19:20:19 $
Author:
Assaf Arkin

Constructor Summary
LDAPCredentials(java.lang.String host, int port, java.lang.String dn, char[] password)
          Constructs a new credential with the given name and password.
 
Method Summary
 void destroy()
          Destroy the credentials.
 java.lang.String getDN()
          Returns the account DN.
 java.lang.String getHost()
          Returns the LDAP Host.
 char[] getPassword()
          Returns the password.
 int getPort()
          Returns the LDAP port on the host.
 boolean isDestroyed()
          Returns true if these credentials have been destroyed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPCredentials

public LDAPCredentials(java.lang.String host,
                       int port,
                       java.lang.String dn,
                       char[] password)
Constructs a new credential with the given name and password.

Parameters:
host - The LDAP host
port - The port on the host
dn - The account DN
password - The password, null if unkonwn
Method Detail

getDN

public java.lang.String getDN()
Returns the account DN.

Returns:
The account DN

getHost

public java.lang.String getHost()
Returns the LDAP Host.

Returns:
The LDAP Host

getPort

public int getPort()
Returns the LDAP port on the host.


getPassword

public char[] getPassword()
Returns the password. The password may be null.

Returns:
The password

destroy

public void destroy()
Destroy the credentials.

Specified by:
destroy in interface javax.security.auth.Destroyable

isDestroyed

public boolean isDestroyed()
Returns true if these credentials have been destroyed.

Specified by:
isDestroyed in interface javax.security.auth.Destroyable


Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.