Informazioni commerciali +39 0575 05077
  Assistenza telefonica +39 0575 0508
 
Common > Disattivare il sistema di autenticazione forte

    1.9 Disattivare il sistema di autenticazione forte

    Tramite il metodo IWSCommon DeactivateUserOtp è possibile disattivare il sistema di autenticazione forte.

    Parametro
    optValue
    Type: String
    Valore ritornato dall'App Aruba OTP Mobile

    /// IWsCommon.DeactivateUserOtp Method (c# .NET)
    public static string DeactivateUserOtp(WsCommonClient client, String optValue)
    {
        //specify the account login details 
        client.ClientCredentials.UserName.UserName = "ARU-0000";
        client.ClientCredentials.UserName.Password = "0123456789";
    
        StringBuilder stringBuilder = new StringBuilder();
    
        try
        {
            // call method DeactivateUserOtp 
            // obtaining a WsResultOfOtpDeactivateUserData item
            WsResultOfOtpDeactivateUserData result =
                client.DeactivateUserOtp(optValue);
    
            // if the call is Success print returned values
            if (result.Success)
            {
                stringBuilder.Append("Operation ends successfully\n");
    
                // get Value returned from server
                OtpDeactivateUserData item = result.Value;
    
                if (item != null)
                {
                    stringBuilder.Append("Custom Product detail\n");
    
                    stringBuilder.Append("\nDeactivationOk: ");
                    stringBuilder.Append(item.DeactivationOk);
                    stringBuilder.Append("\nAttempsLeft: ");
                    stringBuilder.Append(item.AttempsLeft);
                }
            }
            else
            {
                throw new ApplicationException(result.ResultMessage);
            }
        }
        catch (Exception ex)
        {
            // re-run the error
            throw new ApplicationException(ex.Message);
        }
    
        return stringBuilder.ToString();
    }
    
    /// IWsCommon.DeactivateUserOtp Method (JAVA)
    public static String DeactivateUserOtp(IWsCommon client, String optValue)
    {
        //specify the account login details 
        ((BindingProvider) client).getRequestContext()
            .put(BindingProvider.USERNAME_PROPERTY, "ARU-0000");
        ((BindingProvider) client).getRequestContext()
            .put(BindingProvider.PASSWORD_PROPERTY, "0123456789");
    
        StringBuilder StringBuilder = new StringBuilder();
    
        try
        {
            // call method DeactivateUserOtp 
            // obtaining a WsResultOfOtpDeactivateUserData item
            WsResultOfOtpDeactivateUserData result =
                client.deactivateUserOtp(optValue);
    
            // if the call is Success print returned values
            if (result.isSuccess())
            {
                StringBuilder.append("Operation ends successfully\n");
    
                // get Value returned from server
                OtpDeactivateUserData item = result.getValue();
    
                if (item != null)
                {
                    StringBuilder.append("Custom Product detail\n");
    
                    StringBuilder.append("\nDeactivationOk: ");
                    StringBuilder.append(item.gerDeactivationOk());
                    StringBuilder.append("\nAttempsLeft: ");
                    StringBuilder.append(item.getAttempsLeft());
                }
            }
            else
            {
                throw new Exception(result.getResultMessage());
            }
        }
        catch (Exception ex)
        {
            // re-run the error
                System.out.println(ex);
        }
    
        return StringBuilder.toString();
    }
    
    Version
    API: v2.7 URL:https://api.dc1.computing.cloud.it/WsCommon/v2.7/WsCommon.svc?wsdl