javax.wbem.client
Class RoleCredential

java.lang.Object
  extended by javax.wbem.client.RoleCredential

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.

Since:
JSR48 1.0.0

Constructor Summary
RoleCredential(char[] credential)
          Creates a role credential using the supploed 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
 
Method Summary
 char[] getCredential()
          Return the role credential in clear text.
 String getHostName()
          Get the host name for which the password is used to authenticate.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleCredential

public RoleCredential(char[] credential)
Creates a role credential using the supploed credential

Parameters:
credential - The role credential in clear text.
Throws:
IllegalArguementException - If the credential is null

RoleCredential

public RoleCredential(String credential)
Creates a role credential using the supplied credential

Parameters:
credential - The role credential in clear text.
Throws:
IllegalArguementException - If the credential is null

RoleCredential

public RoleCredential(String credential,
                      String hostname)
Creates a role credential using the supplied credential and hostname

Parameters:
credential - The role credential in clear text.
Throws:
IllegalArguementException - If the credential is null
Method Detail

getCredential

public char[] getCredential()
Return the role credential in clear text.

Returns:
The role credential.

getHostName

public String getHostName()
Get the host name for which the password is used to authenticate.

Returns:
The host name


Copyright © 2002-2008 WBEM Solutions, Inc. All Rights Reserved.