taler-docs

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

patch-private-otp-devices-DEVICE_ID.rst (1339B)


      1 .. http:patch:: [/instances/$INSTANCE]/private/otp-devices/$DEVICE_ID
      2 
      3   This is used to update an OTP device. It is useful when we need to change information in the OTP device or when we have mistake some information.
      4 
      5   **Required permission:** ``otp-devices-write``
      6 
      7   **Request:**
      8 
      9   The request must be a `OtpDevicePatchDetails`.
     10 
     11   **Response:**
     12 
     13   :http:statuscode:`204 No content`:
     14     The template has successfully modified.
     15   :http:statuscode:`400 Bad Request`:
     16     The request body is malformed.
     17   :http:statuscode:`404 Not found`:
     18     The OTP device(ID) is unknown to the backend.
     19   :http:statuscode:`500 Internal Server Error`:
     20     The server experienced an internal failure.
     21     Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``.
     22 
     23   **Details:**
     24 
     25   .. ts:def:: OtpDevicePatchDetails
     26 
     27    interface OtpDevicePatchDetails {
     28 
     29      // Human-readable description for the device.
     30      otp_device_description: string;
     31 
     32      // A key encoded with RFC 3548 Base32.
     33      // IMPORTANT: This is not using the typical
     34      // Taler base32-crockford encoding.
     35      // Instead it uses the RFC 3548 encoding to
     36      // be compatible with the TOTP standard.
     37      otp_key?: string;
     38 
     39      // Algorithm for computing the POS confirmation.
     40      otp_algorithm: Integer;
     41 
     42      // Counter for counter-based OTP devices.
     43      otp_ctr?: Integer;
     44    }