Generate TOTP code Version 1 (python)

Action group: General


Description

The action generate a code to pass two-factor authentication

Action icon 


Parameters

Input parameters 

Secret key - secret key, which is taken from the service where authentication is to take place. The code will be generated based on this key. Only digits and letters of the Latin alphabet are allowed in the key. The key must match the selected format.

Secret key format - is a commonly used format for recording the secret key, which depends on the service type where authentication takes place. There are 2 options to choose from: base64, hexadecimal. The default value is “base64”.

Hash algorithm - data encryption method, which depends on the service type. There are 3 options to choose from: SHA-1, SHA-256, SHA-512. The default value is “SHA-1”.

Timeout (ms) - time during which the generated code is relevant. It is indicated in milliseconds. The minimum permissible value is “1000”. The default value is “30000”.  

Code length - length of the code that will be generated as a result. The allowed value is between 1 and 10. The default value is “6”.

Output parameters 

Generated code - generated code intended for pass authentication.

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Secret keySecret key, which is taken from the service.Robin.String
Yes
Secret key formatThe format of the secret key, which depends on the type of service.Robin.String
No
Hash algorithmData encryption method, which depends on the type of service.Robin.String
No
Timeout (ms)Time in milliseconds during which the generated code is relevant.Robin.Numeric
No
Сode lengthGenerated code length.Robin.Numeric
No
Results
Generated codeGenerated code intended for pass authentication.Robin.String

Special conditions of use 

In most cases, the default values of parameters are relevant. Selection of other parameter values and code generation based on them depends entirely on the service for which code generation is performed.

Example of use

Task 

Authenticate in the portal of state services.

Solution

Use the "Generate TOTP code" action. 

Implementation

  1. Move the "Generate TOTP code" action to the workspace.

  2. Set the "Generate TOTP code" action parameters:

    1. Set the secret key. 

    2. Set the "Secret key format " to Base32.

  3. Move the "Open browser" action to the workspace.

     

  4. Move the "Get active URL" action to the workspace.

     

  5. Set the "Get active URL" action parameters:
    1. In the "Context" field specify the context obtained by the "Open browser" action.
    2. In the "Page URL" set the URL of the authorization in the state services portal - "https://esia.gosuslugi.ru/login/".
  6. Move the "Send text" action to the workspace. 
  7. Set the "Send text" action parameters:
    1. In the "Context" field specify the context obtained by the "Open browser" action. 
    2. In the "Element" field set the login input field. 
    3. In the "Text" field set the state services portal login. 
  8. Move the "Send text" action to the workspace. 
  9. Set the "Send text" action parameters:
    1. In the "Context" field specify the context obtained by the "Open browser" action. 
    2. In the "Element" field set the password input field. 
    3. In the "Text" field set the state services portal password.
  10. Move the "Send click" action to the workspace. 
  11. Заполнить параметры действия "Send click":
    1. В поле "Context" указать контекст, полученный действием "Open browser".
    2. В поле "Element" указать кнопку входа.
    3. В поле "Click event type" указать "left click".
  12. Move the "Keyboard input" action to the workspace. 
  13. Set the "Keyboard input" action parameters:
    1. In the "Text" field set the "Generate TOTP code" action result.
  14. Click "Start" in the top panel. 

Result

The program robot completed successfully. 

The authentification on the state services portal was completed with the one-time TOTP code.

Generated code: 836762

  • Нет меток