Package org.sblim.wbem.client
Class PasswordCredential
- java.lang.Object
-
- org.sblim.wbem.client.PasswordCredential
-
public class PasswordCredential extends java.lang.Object
Provides password based credential for a user login authentication. This class must be used with the UserPrincipal interface, which contains the username and host name of the system for which the password is associeted to it.
-
-
Constructor Summary
Constructors Constructor Description PasswordCredential()
Constructs an object of a PasswordCredential.PasswordCredential(char[] pPassword)
Constructs an object of a PasswordCredential with the specified password.PasswordCredential(java.lang.String pPassword)
Deprecated.for security reason this class has been deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearUserPassword()
Clears the user password from memory and resets the password to null.boolean
equals(java.lang.Object o)
java.lang.String
getHostName()
Gets the host name.char[]
getUserPassword()
Gets a copy of the user password.int
hashCode()
void
setHostName(java.lang.String pHostname)
Specifies the host name.void
setUserPassword(char[] pPassword)
Sets a new password for this credential object.
-
-
-
Constructor Detail
-
PasswordCredential
public PasswordCredential()
Constructs an object of a PasswordCredential. Hostname and user password will both be null.
-
PasswordCredential
public PasswordCredential(java.lang.String pPassword)
Deprecated.for security reason this class has been deprecated. PasswordCredential(char[] password) constructor must be used instead of this constructor.Constructs an object of a PasswordCredential with the specified password.- Parameters:
pPassword
-
-
PasswordCredential
public PasswordCredential(char[] pPassword)
Constructs an object of a PasswordCredential with the specified password.- Parameters:
pPassword
-
-
-
Method Detail
-
clearUserPassword
public void clearUserPassword()
Clears the user password from memory and resets the password to null.
-
getHostName
public java.lang.String getHostName()
Gets the host name.- Returns:
- hostname
-
getUserPassword
public char[] getUserPassword()
Gets a copy of the user password.- Returns:
- user password
-
setHostName
public void setHostName(java.lang.String pHostname)
Specifies the host name.- Parameters:
pHostname
- New hostname to be set.
-
setUserPassword
public void setUserPassword(char[] pPassword)
Sets a new password for this credential object. Old password will be cleared!- Parameters:
pPassword
- New password to be set.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-