taler-docs

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

post-challenge-CHALLENGE_ID.rst (1614B)


      1 .. http:post:: [/instances/$INSTANCE]/challenge/$CHALLENGE_ID
      2 
      3   Send TAN code for the ``CHALLENGE_ID`` challenge.
      4 
      5   This request can be posted several times to trigger TAN retransmission when
      6   the current code has expired or too many confirmation attempts have been
      7   made.
      8 
      9   This endpoint is not authenticated, it may be used even when mandatory TAN
     10   channels were not validated yet.
     11 
     12   @since **v21**
     13 
     14   **Request:**
     15 
     16   The request body must be a JSON object, but can otherwise be empty
     17   (so just send '{}').
     18 
     19   **Response:**
     20 
     21   :http:statuscode:`200 Ok`:
     22     The TAN code has been sent. The body will be a `ChallengeRequestResponse`.
     23   :http:statuscode:`404 Not Found`:
     24     The challenge was not found.
     25     Returned with ``TALER_EC_MERCHANT_TAN_CHALLENGE_UNKNOWN``.
     26   :http:statuscode:`410 Gone`:
     27     The challenge was already solved.
     28     Returned with ``TALER_EC_MERCHANT_TAN_CHALLENGE_SOLVED``.
     29   :http:statuscode:`429 Too many requests`:
     30     Too many challenges are active right now,
     31     you must wait or confirm current challenges.
     32     Returned with ``TALER_EC_MERCHANT_TAN_TOO_EARLY``.
     33   :http:statuscode:`502 Bad Gateway`:
     34     TAN transmition via ``tan_channel`` failed.
     35     Returned with ``TALER_EC_MERCHANT_MFA_HELPER_EXEC_FAILED``.
     36 
     37   **Details:**
     38 
     39   .. ts:def:: ChallengeRequestResponse
     40 
     41     interface ChallengeRequestResponse {
     42       // How long does the client have to solve the
     43       // challenge.
     44       solve_expiration: Timestamp;
     45 
     46       // What is the earlist time at which the client
     47       // may request a new challenge to be transmitted?
     48       earliest_retransmission: Timestamp;
     49     }