taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

post-private-otp-devices.rst (1396B)


      1 .. http:post:: [/instances/$INSTANCE]/private/otp-devices
      2 
      3   This is used to associate an OTP device with an instance.
      4 
      5   **Required permission:** ``otp-devices-write``
      6 
      7   **Request:**
      8 
      9   The request must be a `OtpDeviceAddDetails`.
     10 
     11   **Response:**
     12 
     13   :http:statuscode:`204 No content`:
     14     The creation of the template is successful.
     15   :http:statuscode:`404 Not found`:
     16     The merchant instance is unknown or it is not in our data.
     17 
     18   **Details:**
     19 
     20   .. ts:def:: OtpDeviceAddDetails
     21 
     22     interface OtpDeviceAddDetails {
     23 
     24       // Device ID to use.
     25       otp_device_id: string;
     26 
     27       // Human-readable description for the device.
     28       otp_device_description: string;
     29 
     30       // A key encoded with RFC 3548 Base32.
     31       // IMPORTANT: This is not using the typical
     32       // Taler base32-crockford encoding.
     33       // Instead it uses the RFC 3548 encoding to
     34       // be compatible with the TOTP standard.
     35       otp_key: string;
     36 
     37       // Algorithm for computing the POS confirmation.
     38       // "NONE" or 0: No algorithm (no pos confirmation will be generated)
     39       // "TOTP_WITHOUT_PRICE" or 1: Without amounts (typical OTP device)
     40       // "TOTP_WITH_PRICE" or 2: With amounts (special-purpose OTP device)
     41       // The "string" variants are supported @since protocol **v7**.
     42       otp_algorithm: Integer | string;
     43 
     44       // Counter for counter-based OTP devices.
     45       otp_ctr?: Integer;
     46     }