com.ibm.itim.authentication
Class Credentials

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--com.ibm.itim.authentication.Credentials
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class Credentials
extends java.util.Hashtable

Credentials is a class that extends the Hashtable class for holding a user's credentials for authentication.

Author:
Tony Gullotta
See Also:
Serialized Form

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
Credentials()
          Constructs a Credentials instance.
 
Method Summary
 java.lang.Object getCredential(java.lang.String key)
          Returns the user credential with the given key, or name.
 java.lang.Object setCredential(java.lang.String key, java.lang.Object value)
          Creates an association between the given key, or name, and the given value of a user's credential.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Credentials

public Credentials()
Constructs a Credentials instance.
Method Detail

getCredential

public java.lang.Object getCredential(java.lang.String key)
Returns the user credential with the given key, or name.
Parameters:
key - the name of the credential.
Returns:
the Object representing the credential with the given name, or null if none found.

setCredential

public java.lang.Object setCredential(java.lang.String key,
                                      java.lang.Object value)
Creates an association between the given key, or name, and the given value of a user's credential. If the key is not already present in the Credentials, the key and value is added. If the key is already present, the given value will replace the existing value for the given key.
Parameters:
key - the name of the credential.
value - the value of the credential.
Returns:
the previous value of the credential (if any).