| java.lang.Object javax.jcr.SimpleCredentials
SimpleCredentials | final public class SimpleCredentials implements Credentials(Code) | | SimpleCredentials implements the Credentials
interface and represents simple user ID/password credentials.
|
Constructor Summary | |
public | SimpleCredentials(String userID, char[] password) The constructor creates a new SimpleCredentials object,
given a user ID and password.
Note that the given password is cloned before it is stored
in the new SimpleCredentials object. |
SimpleCredentials | public SimpleCredentials(String userID, char[] password)(Code) | | The constructor creates a new SimpleCredentials object,
given a user ID and password.
Note that the given password is cloned before it is stored
in the new SimpleCredentials object. This should
avoid the risk of having unnecessary references to password data
lying around in memory.
Parameters: userID - the user ID Parameters: password - the user's password |
getAttribute | public Object getAttribute(String name)(Code) | | Returns the value of the named attribute as an Object ,
or null if no attribute of the given name exists.
Parameters: name - a String specifying the name of the attribute an Object containing the value of the attribute,or null if the attribute does not exist |
getAttributeNames | public String[] getAttributeNames()(Code) | | Returns the names of the attributes available to this
credentials instance. This method returns an empty array
if the credentials instance has no attributes available to it.
a string array containing the names of the stored attributes |
getPassword | public char[] getPassword()(Code) | | Returns the user password.
Note that this method returns a reference to the password.
It is the caller's responsibility to zero out the password information
after it is no longer needed.
the password |
getUserID | public String getUserID()(Code) | | Returns the user ID.
the user ID. |
removeAttribute | public void removeAttribute(String name)(Code) | | Removes an attribute from this credentials instance.
Parameters: name - a String specifying the name of the attributeto remove |
setAttribute | public void setAttribute(String name, Object value)(Code) | | Stores an attribute in this credentials instance.
Parameters: name - a String specifying the name of the attribute Parameters: value - the Object to be stored |
|
|