tyrex.security

Class NamePasswordCredentials

public final class NamePasswordCredentials extends Object implements Destroyable

Credentials for name/password authentication. Can be used to authenticate JDBC connections, LDAP connections, etc. The realm can be used to determine where the credentials can be used.

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

Version: $Revision: 1.4 $ $Date: 2001/03/12 19:20:18 $

Author: Assaf Arkin

Constructor Summary
NamePasswordCredentials(String name, char[] password, String realm)
Constructs a new credential with the given name and password.
Method Summary
voiddestroy()
Destroy the credentials.
StringgetName()
Returns the name.
char[]getPassword()
Returns the password.
StringgetRealm()
Returns the realm.
booleanisDestroyed()
Returns true if these credentials have been destroyed.

Constructor Detail

NamePasswordCredentials

public NamePasswordCredentials(String name, char[] password, String realm)
Constructs a new credential with the given name and password.

Parameters: user The name password The password, null if unkonwn realm The realm, null if unknown

Method Detail

destroy

public void destroy()
Destroy the credentials.

getName

public String getName()
Returns the name.

Returns: The name

getPassword

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

Returns: The password

getRealm

public String getRealm()
Returns the realm.

Returns: The realm

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.