javax.wbem.client

Class UserPrincipal

public class UserPrincipal extends Object implements Principal

This class implements a Java security Principal identity for a client user identity that authenticates with a Unix username and login password. That is, it represents the user's login identity on the remote server system which is running the CIMOM.
Constructor Summary
UserPrincipal(String userName)
This constructor accepts the user name.
UserPrincipal(String userName, String hostName)
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 userName)
This constructor accepts the user name.

Parameters: userName - The user login name.

Throws: IllegalArgumentException - If the userName is null.

UserPrincipal

public UserPrincipal(String userName, String hostName)
This constructor accepts the user name and host name.

Parameters: userName - The user login name. hostName - The host name.

Throws: IllegalArgumentException - If the userName is null.

Method Detail

getHostName

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

Returns: The hostname.

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, 2009 IBM Corporation. All Rights Reserved.