Class PasswordCredential
- java.lang.Object
-
- com.sun.enterprise.security.auth.login.common.PasswordCredential
-
public class PasswordCredential extends Object
This class holds the user password for the shared password realm and the realm name. This credential is added as a private credential to the JAAS subject.
-
-
Constructor Summary
Constructors Constructor Description PasswordCredential(String user, char[] password, String realm)
Construct a credential with the specified password and realm name.PasswordCredential(String user, char[] password, String realm, byte[] target_name)
called by SecServerRequestInterceptor The object if created on the server side is readonly
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Compare two instances of the credential and return true if they are the same and false otherwise.char[]
getPassword()
Return the password.String
getRealm()
Return the realm name.byte[]
getTargetName()
Return the target_nameString
getUser()
Return the username.int
hashCode()
Return the hashCode computed from the password and realm name.void
setRealm(String realm)
String
toString()
The string representation of the credential.
-
-
-
Method Detail
-
getRealm
public String getRealm()
Return the realm name.- Returns:
- the realm name. Only value supported for now is "default".
-
getUser
public String getUser()
Return the username.- Returns:
- the user name.
-
setRealm
public void setRealm(String realm)
-
getPassword
public char[] getPassword()
Return the password.- Returns:
- the password.
-
getTargetName
public byte[] getTargetName()
Return the target_name- Returns:
- the target_name
-
equals
public boolean equals(Object o)
Compare two instances of the credential and return true if they are the same and false otherwise.
-
hashCode
public int hashCode()
Return the hashCode computed from the password and realm name.
-
-