IWsEndUserGetUserInfo Method
|
Gets information about the user. By the method GetUserInfo () of Aruba WsEndUser, it is possible to obtain
detailed information on the account specified at the time of authentication. For example, you can learn
the unique identifier assigned to the (UserId), or whether the user is active or disabled.
Namespace:
Aruba.Cloud.WsEndUser
Assembly:
Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax [OperationContractAttribute]
WsResult<UserInfo> GetUserInfo()
<OperationContractAttribute>
Function GetUserInfo As WsResult(Of UserInfo)
[OperationContractAttribute]
WsResult<UserInfo^>^ GetUserInfo()
[<OperationContractAttribute>]
abstract GetUserInfo : unit -> WsResult<UserInfo>
function GetUserInfo() : WsResult<UserInfo>
Return Value
Type:
WsResultUserInfo
The method returns an object of class WsResultOfUserInfo containing detailed information of the account.
For further details on the information returned by the method see the class definition
WsResult and class
UserInfo .
Examples
In the following example describes a method, called GetUserStatus(), which via a method call GetUserInfo()
WsEndUser of Aruba, to obtain information about the specified user upon authentication. In the specific case
the example below, it is extracted the user's status as member of the UserStatus.
private UserStatus GetUserStatus(WsEndUserClient client)
{
UserStatus userStatus;
try
{
WsResultOfUserInfo result = client.GetUserInfo();
if (result.Success)
return result.Value.UserStatus;
else
{
throw new ApplicationException( String.Format(
"An error has occurred while invoking GetUserInfo(). {0}", result.ResultMessage));
}
}
catch (Exception ex)
{
throw new ApplicationException(String.Format("An error has occurred while getting user status {0}", ex.Message));
}
}
See Also