Class PasswordCredential
java.lang.Object
com.sun.enterprise.security.auth.login.common.PasswordCredential
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
ConstructorDescriptionPasswordCredential
(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
Modifier and TypeMethodDescriptionboolean
Compare two instances of the credential and return true if they are the same and false otherwise.char[]
Return the password.getRealm()
Return the realm name.byte[]
Return the target_namegetUser()
Return the username.int
hashCode()
Return the hashCode computed from the password and realm name.void
toString()
The string representation of the credential.
-
Constructor Details
-
PasswordCredential
Construct a credential with the specified password and realm name.- Parameters:
the
- password.the
- realm name. The only value supported for now is "default".
-
PasswordCredential
called by SecServerRequestInterceptor The object if created on the server side is readonly
-
-
Method Details
-
getRealm
Return the realm name.- Returns:
- the realm name. Only value supported for now is "default".
-
getUser
Return the username.- Returns:
- the user name.
-
setRealm
-
getPassword
public char[] getPassword()Return the password.- Returns:
- the password.
-
getTargetName
public byte[] getTargetName()Return the target_name- Returns:
- the target_name
-
equals
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. -
toString
The string representation of the credential.
-