Synchronizes the token for the provided username.

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

<OperationContract()> _ 
Function SyncToken( _ 
ByVal otpValue1 As String, _ 
ByVal otpValue2 As String
) As WsResult(Of Boolean)
This language is not supported or no code example is available.
[OperationContract()] 
WsResult<bool> SyncToken( 
string otpValue1
string otpValue2 
)
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

otpValue1

Type: string

otpValue2

Type: string

 
/// IWsCommon.SyncToken Method (c# .NET) 
public static string SyncToken(WsCommonClient client, 
String optValue1, String optValue2) 

//specify the account login details 
client.ClientCredentials.UserName.UserName = "ARU-0000"; 
client.ClientCredentials.UserName.Password = "0123456789"; 
 
StringBuilder stringBuilder = new StringBuilder(); 
 
try 

// call method SyncToken 
// obtaining a WsResultOfboolean item 
WsResultOfboolean result = 
client.SyncToken(optValue1, optValue2); 
 
// if the call is Success print returned values 
if (result.Success) 

stringBuilder.Append("Operation ends successfully\n"); 
 
// get Value returned from server 
bool value = result.Value; 
 
stringBuilder.Append("\nReturned value: "); 
stringBuilder.Append(value); 
 

else 

throw new ApplicationException(result.ResultMessage); 


catch (Exception ex) 

// re-run the error 
throw new ApplicationException(ex.Message); 

 
return stringBuilder.ToString();