X4 Produktdokumentation

TOTP One-Time Password Generator

This adapter generates a TOTP one-time password that is compatible with Google Authenticator and other tools.

Properties

Operation

Operation executed by the adapter

Possible values:

  • GenerateSecret: Create a 20-byte Base32 string that can be used as a secret key for password generation or validation or as a basis for a QR code image

  • GeneratePassword: Create a one-time password based on the secret key provided in the XML input document

  • VerifyPassword: Check the one-time password in combination with the secret key – both are specified in the XML input document

  • GenerateAuthenticatorQRCode: Create a 512x512 px image (.png) based on the secret key provided in the XML input document

    This operation also uses the issuer and account parameters to comment on the QR code. This information becomes visible when the code is scanned by Google Authenticator or a similar tool.

Parameters

issuer

Name of the company or organization that issues the one-time password

This parameter should be treated like a display name because it appears as specified in the Authenticator app, such as SoftProject GmbH.

account

An account that is tied to the secret key—typically a user name or email address

This parameter should be treated like a display name because it appears as specified in the Authenticator app, such as John Doe or john.doe@example.org.

Status values

1

The operation was successful.

-1

An error occurred during the operation.

403

The password does not match, for example, because the input structure is not well formed.

Input

The adapter expects a different input structure depending on the selected operation.

  • Operation GenerateSecret:
    This operation does not require any input.

  • Operation GeneratePassword:

    Input

    XML
    <Secret>
            <!-- 20-byte BASE32 character string -->
        </Secret>
    
  • Operation VerifyPassword:

    Input

    XML
     <TOTP>
            <Password>
                <!-- 6-digit number with leading zeroes -->
            </Password>
            <Secret>
                <!-- 20-byte BASE32 character string -->
            </Secret>
        </TOTP>
    
  • Operation GenerateAuthenticatorQRCode:

    Input

    XML
    <Secret>
    	<!-- 20-byte BASE32 character string -->
    </Secret>
    

Output

The adapter outputs various documents depending on the operation that is performed:

  • Operation GenerateSecret:

    Output

    XML
    <Secret>
    	<!-- 20-byte BASE32 character string -->
    </Secret>
    
  • Operation GeneratePassword:

    Output

    XML
     <Password>
            <!-- 6-digit number with leading zeroes -->
        </Password>
    
  • Operation VerifyPassword:

    Output

    XML
     <Ok description="The password matches."/>
                   <!-- or -->  
     <Error description="The password provided is incorrect."/>
    
  • Operation GenerateAuthenticatorQRCode:
    An image (.png) with a QR code is returned.