Package javax.wbem.client
Class RoleCredential
- java.lang.Object
-
- javax.wbem.client.RoleCredential
-
public class RoleCredential extends java.lang.Object
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 theRolePrincipal
.RoleCredential
should be used in conjunction with theRolePrincipal
instance. This should only be used when a client is assuming a role on a WBEM Server that requires a password.
-
-
Constructor Summary
Constructors Constructor Description RoleCredential(char[] pCredential)
Creates a role credential using the supplied credential.RoleCredential(java.lang.String pCredential)
Creates a role credential using the supplied credential.RoleCredential(java.lang.String pCredential, java.lang.String pHostname)
Creates a role credential using the supplied credential and host name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char[]
getCredential()
Return the role credential in clear text.java.lang.String
getHostName()
Get the host name for which the password is used to authenticate.
-
-
-
Constructor Detail
-
RoleCredential
public RoleCredential(char[] pCredential) throws java.lang.IllegalArgumentException
Creates a role credential using the supplied credential.- Parameters:
pCredential
- The role credential in clear text.- Throws:
java.lang.IllegalArgumentException
- If the credential isnull
.
-
RoleCredential
public RoleCredential(java.lang.String pCredential) throws java.lang.IllegalArgumentException
Creates a role credential using the supplied credential.- Parameters:
pCredential
- The role credential in clear text.- Throws:
java.lang.IllegalArgumentException
- If the credential isnull
.
-
RoleCredential
public RoleCredential(java.lang.String pCredential, java.lang.String pHostname) throws java.lang.IllegalArgumentException
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:
java.lang.IllegalArgumentException
- If the credential isnull
.
-
-