Package javax.wbem.client
Class RoleCredential
java.lang.Object
javax.wbem.client.RoleCredential
RoleCredential
implements a password based credential for a
role. RoleCredential
includes the credential (e.g. password) and
optionally the host information for which the password is used to
authenticate the RolePrincipal
. RoleCredential
should be used in conjunction with the RolePrincipal
instance.
This should only be used when a client is assuming a role on a WBEM Server
that requires a password.-
Constructor Summary
ConstructorsConstructorDescriptionRoleCredential
(char[] pCredential) Creates a role credential using the supplied credential.RoleCredential
(String pCredential) Creates a role credential using the supplied credential.RoleCredential
(String pCredential, String pHostname) Creates a role credential using the supplied credential and host name. -
Method Summary
Modifier and TypeMethodDescriptionchar[]
Return the role credential in clear text.Get the host name for which the password is used to authenticate.
-
Constructor Details
-
RoleCredential
Creates a role credential using the supplied credential.- Parameters:
pCredential
- The role credential in clear text.- Throws:
IllegalArgumentException
- If the credential isnull
.
-
RoleCredential
Creates a role credential using the supplied credential.- Parameters:
pCredential
- The role credential in clear text.- Throws:
IllegalArgumentException
- If the credential isnull
.
-
RoleCredential
Creates a role credential using the supplied credential and host name.- Parameters:
pCredential
- The role credential in clear text.pHostname
- - The host name for this credential.- Throws:
IllegalArgumentException
- If the credential isnull
.
-
-
Method Details
-
getCredential
public char[] getCredential()Return the role credential in clear text.- Returns:
- The role credential.
-
getHostName
Get the host name for which the password is used to authenticate.- Returns:
- The host name.
-