javax.wbem.client

Class UserPrincipal

public class UserPrincipal extends Object implements Principal

UserPrincipal implements a Principal identity for a client user identity that authenticates with a username and password. In other words, it represents the user's login identity on the remote system. UserPrincipal includes the username and optionally the host information for which the username is used to authenticate.
Constructor Summary
UserPrincipal(String pUserName)
This constructor accepts the user name.
UserPrincipal(String pUserName, String pHostName)
This constructor accepts the user name and host name.
Method Summary
StringgetHostName()
Return the host name associated with this principal.
StringgetName()
Return the name of this principal identity; that is, return the login name.
StringgetUserName()
Return the principal's login user name.

Constructor Detail

UserPrincipal

public UserPrincipal(String pUserName)
This constructor accepts the user name.

Parameters: pUserName The user login name.

Throws: IllegalArgumentException If the is null.

UserPrincipal

public UserPrincipal(String pUserName, String pHostName)
This constructor accepts the user name and host name.

Parameters: pUserName The user login name. pHostName The host name for this principal.

Throws: IllegalArgumentException If the pUserName is null.

Method Detail

getHostName

public String getHostName()
Return the host name associated with this principal.

Returns: The host name.

getName

public String getName()
Return the name of this principal identity; that is, return the login name.

Returns: The name of this principal identity.

See Also: java.security.Principal#getName()

getUserName

public String getUserName()
Return the principal's login user name.

Returns: The user login name.

Copyright © 2005, 2010 IBM Corporation. All Rights Reserved.