javax.wbem.client
public class RoleCredential extends 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 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 and Description |
---|
RoleCredential(char[] credential)
Creates a role credential using the supplied credential
|
RoleCredential(String credential)
Creates a role credential using the supplied credential
|
RoleCredential(String credential,
String hostname)
Creates a role credential using the supplied credential and hostname
|
Modifier and Type | Method and Description |
---|---|
char[] |
getCredential()
Return the role credential in clear text.
|
String |
getHostName()
Get the host name for which the password is used to authenticate.
|
public RoleCredential(char[] credential) throws IllegalArgumentException
credential
- - The role credential in clear text.IllegalArgumentException
- - If the credential is null
.public RoleCredential(String credential) throws IllegalArgumentException
credential
- - The role credential in clear text.IllegalArgumentException
- - If the credential is null
.public RoleCredential(String credential, String hostname) throws IllegalArgumentException
credential
- - The role credential in clear text.hostname
- - The hostname information for which the password is used to
authenticateIllegalArgumentException
- - If the credential is null
.public char[] getCredential()
public String getHostName()
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.