From a875828acb66b96fdaa80f24a88ccc69abb29654 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 31 Oct 2020 16:27:43 +0100 Subject: clean up use of HTTP status codes --- anastasis.rst | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'anastasis.rst') diff --git a/anastasis.rst b/anastasis.rst index 1e59a6b1..24010008 100644 --- a/anastasis.rst +++ b/anastasis.rst @@ -481,18 +481,18 @@ In the following, UUID is always defined and used according to `RFC 4122`_. **Response**: - :status 200 OK: + :http:statuscode:`200 OK`: The escrow provider responds with an EncryptedRecoveryDocument_ object. - :status 304 Not modified: + :http:statuscode:`304 Not modified`: The client requested the same resource it already knows. - :status 400 Bad request: + :http:statuscode:`400 Bad request`: The $ACCOUNT_PUB is not an EdDSA public key. - :status 402 Payment Required: + :http:statuscode:`402 Payment Required`: The account's balance is too low for the specified operation. See the Taler payment protocol specification for how to pay. - :status 403 Forbidden: + :http:statuscode:`403 Forbidden`: The required account signature was invalid. - :status 404 Not Found: + :http:statuscode:`404 Not found`: The requested resource was not found. *Anastasis-Version*: $NUMBER --- The server must return actual version of the encrypted recovery document via this header. @@ -551,24 +551,24 @@ In the following, UUID is always defined and used according to `RFC 4122`_. **Response**: - :status 204 No Content: + :http:statuscode:`204 No content`: The encrypted recovery document was accepted and stored. "Anastasis-Version" and "Anastasis-UUID" headers incidate what version and UUID was assigned to this encrypted recovery document upload by the server. - :status 304 Not modified: + :http:statuscode:`304 Not modified`: The same encrypted recovery document was previously accepted and stored. "Anastasis-Version" header incidates what version was previously assigned to this encrypted recovery document. - :status 400 Bad request: + :http:statuscode:`400 Bad request`: The $ACCOUNT_PUB is not an EdDSA public key or mandatory headers are missing. The response body MUST elaborate on the error using a Taler error code in the typical JSON encoding. - :status 402 Payment Required: + :http:statuscode:`402 Payment required`: The account's balance is too low for the specified operation. See the Taler payment protocol specification for how to pay. The response body MAY provide alternative means for payment. - :status 403 Forbidden: + :http:statuscode:`403 Forbidden`: The required account signature was invalid. The response body may elaborate on the error. - :status 409 Conflict: + :http:statuscode:`409 Conflict`: The *If-Match* Etag does not match the latest prior version known to the server. - :status 413 Request Entity Too Large: + :http:statuscode:`413 Request entity too large`: The upload is too large *or* too small. The response body may elaborate on the error. **Details:** @@ -683,20 +683,20 @@ charge per truth operation using GNU Taler. Upload a TruthUploadRequest_-Object according to the policy the client created before (see RecoveryDocument_). If request has been seen before, the server should do nothing, and otherwise store the new object. - :status 204 No content: + :http:statuscode:`204 No content`: Truth stored successfully. - :status 304 Not modified: + :http:statuscode:`304 Not modified`: The same truth was previously accepted and stored under this UUID. The Anastasis server must still update the expiration time for the truth when returning this response code. - :status 402 Payment Required: + :http:statuscode:`402 Payment required`: This server requires payment to store truth per item. See the Taler payment protocol specification for how to pay. The response body MAY provide alternative means for payment. - :status 409 Conflict: + :http:statuscode:`409 Conflict`: The server already has some truth stored under this UUID. The client should check that it is generating UUIDs with enough entropy. - :status 412 Precondition Failed: + :http:statuscode:`412 Precondition failed`: The selected authentication method is not supported on this provider. @@ -744,25 +744,25 @@ charge per truth operation using GNU Taler. **Response**: - :status 200 OK: + :http:statuscode:`200 OK`: EncryptedKeyShare_ is returned in body (in binary). - :status 202 Accepted: + :http:statuscode:`202 Accepted`: The escrow provider will respond out-of-band (i.e. SMS). The body may contain human-readable instructions on next steps. - :status 303 See Other: + :http:statuscode:`303 See other`: The provider redirects for authentication (i.e. video identification/WebRTC). If the client is not a browser, it should launch a browser at the URL given in the "Location" header and allow the user to re-try the operation after successful authorization. - :status 402 Payment Required: + :http:statuscode:`402 Payment required`: The service requires payment for access to truth. See the Taler payment protocol specification for how to pay. The response body MAY provide alternative means for payment. - :status 403 Forbidden: + :http:statuscode:`403 Forbidden`: The server requires a valid "response" to the challenge associated with the UUID. - :status 404 Not Found: + :http:statuscode:`404 Not found`: The server does not know any truth under the given UUID. - :status 503 Service Unavailable: + :http:statuscode:`503 Service Unavailable`: Server is out of Service. *Truth-Decryption-Key*: Key used to encrypt the **truth** (see encrypted_truth within TruthUploadRequest_) and which has to provided by the user. The key is stored with -- cgit v1.2.3