tyrex.security.ldap

Class LDAPCredentials

public final class LDAPCredentials extends Object implements 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(String host, int port, String dn, char[] password)
Constructs a new credential with the given name and password.
Method Summary
voiddestroy()
Destroy the credentials.
StringgetDN()
Returns the account DN.
StringgetHost()
Returns the LDAP Host.
char[]getPassword()
Returns the password.
intgetPort()
Returns the LDAP port on the host.
booleanisDestroyed()
Returns true if these credentials have been destroyed.

Constructor Detail

LDAPCredentials

public LDAPCredentials(String host, int port, 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

destroy

public void destroy()
Destroy the credentials.

getDN

public String getDN()
Returns the account DN.

Returns: The account DN

getHost

public String getHost()
Returns the LDAP Host.

Returns: The LDAP Host

getPassword

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

Returns: The password

getPort

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

Parameters: the LDAP port on the host.

isDestroyed

public boolean isDestroyed()
Returns true if these credentials have been destroyed.
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.