tyrex.security
Class NamePasswordCredentials

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

public final class NamePasswordCredentials
extends java.lang.Object
implements javax.security.auth.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(java.lang.String name, char[] password, java.lang.String realm)
          Constructs a new credential with the given name and password.
 
Method Summary
 void destroy()
          Destroy the credentials.
 java.lang.String getName()
          Returns the name.
 char[] getPassword()
          Returns the password.
 java.lang.String getRealm()
          Returns the realm.
 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

NamePasswordCredentials

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

Parameters:
password - The password, null if unkonwn
realm - The realm, null if unknown
Method Detail

getName

public java.lang.String getName()
Returns the name.

Returns:
The name

getRealm

public java.lang.String getRealm()
Returns the realm.

Returns:
The realm

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.