taler-docs

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

commit 8ed6688f77fb1cef2fb4c8cee5d7a4fe985f8180
parent d46b40aa53d716a7b9225732c33056a0c86c226d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  4 Apr 2021 14:40:40 +0200

document more challenge states

Diffstat:
Manastasis.rst | 65++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 60 insertions(+), 5 deletions(-)

diff --git a/anastasis.rst b/anastasis.rst @@ -2101,9 +2101,32 @@ that applications must all handle. States other than ``solved`` are: } } - - **instructions**: Here, the server provided human-readable instructions for - how to solve the challenge. Note that the ``instructions`` provided this - time are from the Anastasis provider and may differ from the ``instructions`` + - **body**: Here, the server provided an HTTP reply for + how to solve the challenge, but the reducer could not parse + them into a known format. A mime-type may be provided and may + help parse the details. + + .. code-block:: json + + { + "recovery_state": "CHALLENGE_SOLVING", + "recovery_information": { + // ... + } + "selected_challenge_uuid": "TXYKGE1SJZHJ4M2FKSV1P2RZVNTHZFB9E3A79QE956D3SCAWXPK0", + "challenge_feedback": { + "TXYKGE1SJZHJ4M2FKSV1P2RZVNTHZFB9E3A79QE956D3SCAWXPK0": { + "state": "body", + "body": "CROCKFORDBASE32ENCODEDBODY", + "http_status": 403, + "mime_type" : "anything/possible" + } + } + } + + - **hint**: Here, the server provided human-readable hint for + how to solve the challenge. Note that the ``hint`` provided this + time is from the Anastasis provider and may differ from the ``instructions`` for the challenge under ``recovery_information``: .. code-block:: json @@ -2116,8 +2139,32 @@ that applications must all handle. States other than ``solved`` are: "selected_challenge_uuid": "TXYKGE1SJZHJ4M2FKSV1P2RZVNTHZFB9E3A79QE956D3SCAWXPK0", "challenge_feedback": { "TXYKGE1SJZHJ4M2FKSV1P2RZVNTHZFB9E3A79QE956D3SCAWXPK0": { - "state": "instructions", - "instructions": "Recovery TAN send to email mail@DOMAIN", + "state": "hint", + "hint": "Recovery TAN send to email mail@DOMAIN", + "http_status": 403 + } + } + } + + - **details**: Here, the server provided a detailed JSON status response + related to solving the challenge: + + .. code-block:: json + + { + "recovery_state": "CHALLENGE_SOLVING", + "recovery_information": { + // ... + } + "selected_challenge_uuid": "TXYKGE1SJZHJ4M2FKSV1P2RZVNTHZFB9E3A79QE956D3SCAWXPK0", + "challenge_feedback": { + "TXYKGE1SJZHJ4M2FKSV1P2RZVNTHZFB9E3A79QE956D3SCAWXPK0": { + "state": "details", + "details": { + "code": 8111, + "hint": "The client's response to the challenge was invalid.", + "detail" : null + }, "http_status": 403 } } @@ -2126,6 +2173,8 @@ that applications must all handle. States other than ``solved`` are: - **redirect**: To solve the challenge, the user must visit the indicated Web site at ``redirect_url``, for example to perform video authentication: + .. code-block:: json + { "recovery_state": "CHALLENGE_SOLVING", "recovery_information": { @@ -2147,6 +2196,8 @@ that applications must all handle. States other than ``solved`` are: messages at this time due to an outage. The body includes details about the failure. The user may try again later or continue with other challenges. + .. code-block:: json + { "recovery_state": "CHALLENGE_SELECTING", "recovery_information": { @@ -2166,6 +2217,8 @@ that applications must all handle. States other than ``solved`` are: the specified challenge. This is typically a permanent failure, and user interfaces should not allow users to re-try this challenge. + .. code-block:: json + { "recovery_state": "CHALLENGE_SELECTING", "recovery_information": { @@ -2182,6 +2235,8 @@ that applications must all handle. States other than ``solved`` are: - **rate-limit-exceeded**: + .. code-block:: json + { "recovery_state": "CHALLENGE_SELECTING", "recovery_information": {