Package javax.wbem.client
Class PasswordCredential
java.lang.Object
javax.wbem.client.PasswordCredential
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 Summary
ConstructorsConstructorDescriptionPasswordCredential
(char[] pCredential) Creates aPasswordCredential
using the supplied password.PasswordCredential
(String pCredential) Creates aPasswordCredential
using the supplied password.PasswordCredential
(String pCredential, String pHostname) Creates aPasswordCredential
using the supplied password and host name. -
Method Summary
Modifier and TypeMethodDescriptionGet the host name for which the password is used to authenticate.char[]
Return the user login password in clear text.
-
Constructor Details
-
PasswordCredential
public PasswordCredential(char[] pCredential) Creates aPasswordCredential
using the supplied password.- Parameters:
pCredential
- The user login password in clear text.- Throws:
IllegalArgumentException
- If the credential is null.
-
PasswordCredential
Creates aPasswordCredential
using the supplied password.- Parameters:
pCredential
- The user login password in clear text.- Throws:
IllegalArgumentException
- If the credential is null.
-
PasswordCredential
Creates aPasswordCredential
using the supplied password and host name.- Parameters:
pCredential
- The user login password in clear text.pHostname
- The host name information for which the password is used to authenticate.- Throws:
IllegalArgumentException
- If the credential is null.
-
-
Method Details
-
getHostName
Get the host name for which the password is used to authenticate.- Returns:
- The host name.
-
getUserPassword
public char[] getUserPassword()Return the user login password in clear text.- Returns:
- The user login password.
-