public class PasswordCredential
extends java.lang.Object
PasswordCredential
implements a password based credential. This
is used with UserPrincipal
. PasswordCredential
includes the password and optionally the host information for which the
password is used to authenticate the UserPrincipal
.Constructor and Description |
---|
PasswordCredential(char[] pCredential)
Creates a
PasswordCredential using the supplied password. |
PasswordCredential(java.lang.String pCredential)
Creates a
PasswordCredential using the supplied password. |
PasswordCredential(java.lang.String pCredential,
java.lang.String pHostname)
Creates a
PasswordCredential using the supplied password and
host name. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHostName()
Get the host name for which the password is used to authenticate.
|
char[] |
getUserPassword()
Return the user login password in clear text.
|
public PasswordCredential(char[] pCredential)
PasswordCredential
using the supplied password.pCredential
- The user login password in clear text.java.lang.IllegalArgumentException
- If the credential is null.public PasswordCredential(java.lang.String pCredential)
PasswordCredential
using the supplied password.pCredential
- The user login password in clear text.java.lang.IllegalArgumentException
- If the credential is null.public PasswordCredential(java.lang.String pCredential, java.lang.String pHostname)
PasswordCredential
using the supplied password and
host name.pCredential
- The user login password in clear text.pHostname
- The host name information for which the password is used to
authenticate.java.lang.IllegalArgumentException
- If the credential is null.Copyright © 2005, 2013 IBM Corporation. All Rights Reserved.