IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.security.plugins.builtins
Class UserPasswordCredentialGenerator

java.lang.Object
  extended by com.ibm.websphere.objectgrid.security.plugins.builtins.UserPasswordCredentialGenerator
All Implemented Interfaces:
CredentialGenerator

public class UserPasswordCredentialGenerator
extends Object
implements CredentialGenerator

This credential generator creates UserPasswordCredential objects.

UserPasswordCredentialGenerator has a one to one relationship with UserPasswordCredential because it can only create a UserPasswordCredential representing one identity.

Since:
WAS XD 6.0.1, XC10
See Also:
CredentialGenerator, UserPasswordCredential

Constructor Summary
UserPasswordCredentialGenerator()
          Creates a UserPasswordCredentialGenerator with no user name or password.
UserPasswordCredentialGenerator(String user, String pwd)
          Creates a UserPasswordCredentialGenerator with a specified user name and password
 
Method Summary
 boolean equals(Object obj)
          Checks two UserPasswordCredentialGenerator objects for equality.
 Credential getCredential()
          Creates a new UserPasswordCredential object using this object's user name and password.
 String getPassword()
          Gets the password for this credential generator.
 String getUserName()
          Gets the user name for this credential.
 int hashCode()
          Returns the hashcode of the UserPasswordCredentialGenerator object.
 void setProperties(String properties)
          Sets additional properties namely a user name and password.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserPasswordCredentialGenerator

public UserPasswordCredentialGenerator()
Creates a UserPasswordCredentialGenerator with no user name or password.

See Also:
setProperties(String)

UserPasswordCredentialGenerator

public UserPasswordCredentialGenerator(String user,
                                       String pwd)
Creates a UserPasswordCredentialGenerator with a specified user name and password

Parameters:
user - the user name
pwd - the password
Method Detail

getCredential

public Credential getCredential()
Creates a new UserPasswordCredential object using this object's user name and password.

Specified by:
getCredential in interface CredentialGenerator
Returns:
a new UserPasswordCredential instance
See Also:
CredentialGenerator.getCredential(), UserPasswordCredential

getPassword

public String getPassword()
Gets the password for this credential generator.

Returns:
the password argument that was passed to the constructor

getUserName

public String getUserName()
Gets the user name for this credential.

Returns:
the user argument that was passed to the constructor of this class

setProperties

public void setProperties(String properties)
Sets additional properties namely a user name and password.

Specified by:
setProperties in interface CredentialGenerator
Parameters:
properties - a properties string with a user name and a password separated by a blank.
Throws:
IllegalArgumentException - if the format is not valid

equals

public boolean equals(Object obj)
Checks two UserPasswordCredentialGenerator objects for equality.

Two UserPasswordCredentialGenerator objects are equal if and only if their user names and passwords are equal.

Overrides:
equals in class Object
Parameters:
obj - the object we are testing for equality with this object.
Returns:
true if both UserPasswordCredentialGenerator objects are equivalent.

hashCode

public int hashCode()
Returns the hashcode of the UserPasswordCredentialGenerator object.

Overrides:
hashCode in class Object
Returns:
the hash code of this object

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.