The method generates an authentication token and associates it with the account indicated. Each user is assigned a unique token, valid for a few hours, certifying the authentication service. If you have a valid token you can make calls to methods of WSEndUser.After each call to any method of Aruba WSEndUser, the service checks for a valid token for the account that you specify. If this does not exist, or if the token is found to be expired, you will need to authenticate again to get it.

Namespace: Aruba.Cloud.WsCommon
Assembly: Aruba.Cloud.WsCommon (in Aruba.Cloud.WsCommon.dll)

<OperationContract()> _ 
Function GetUserAuthenticationToken( _ 
ByVal userAuthenticationTokenRequest As GetUserAuthenticationTokenRequest
) As WsResult(Of UserToken)
This language is not supported or no code example is available.
[OperationContract()] 
WsResult<UserToken> GetUserAuthenticationToken( 
GetUserAuthenticationTokenRequest userAuthenticationTokenRequest 
)
This language is not supported or no code example is available.
JScript does not support generic types and methods.
This language is not supported or no code example is available.

Parameters

userAuthenticationTokenRequest

Type: GetUserAuthenticationTokenRequest

 
//IWsCommon.GetUserAuthenticationToken Method (c# .NET) 
private static void LoginToWsCommon(WsCommonClient client) 

//specifica le credenziali dell'account 
client.ClientCredentials.UserName.UserName = "ARU-0000"; 
client.ClientCredentials.UserName.Password = "0123456789"; 
 
try 

WsResultOfUserToken result = client.GetUserAuthenticationToken(); 
 
if (result.Success) 

//il metodo è andato a buon fine 

else 

throw new Exception(result.ResultMessage); 


catch (MessageSecurityException msEx) 

//utente non autenticato 
throw new Exception(msEx.Message); 

catch (Exception ex) 

//eccezione generica 
throw new Exception(ex.Message); 


 
//IWsEndUser.GetUserAuthenticationToken Method (c# .NET) 
private static void LoginToWsEndUser(WsEndUserClient client) 

//specifica le credenziali dell'account 
client.ClientCredentials.UserName.UserName = "ARU-0000"; 
client.ClientCredentials.UserName.Password = "0123456789"; 
 
try 

var result = client.GetUserAuthenticationToken(); 
 
if (result.Success) 

//il metodo è andato a buon fine 

else 

throw new Exception(result.ResultMessage); 


catch (MessageSecurityException msEx) 

//utente non autenticato 
throw new Exception(msEx.Message); 

catch (Exception ex) 

//eccezione generica 
throw new Exception(ex.Message);