commit 1a2f2c9600917992db2bbe4eed5fef00f40d895b
parent e61f47ad264d3b3904101441c09a56e13313c956
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Tue, 5 Sep 2023 23:07:07 +0200
rename /login to /token, add DELETE
Diffstat:
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
@@ -1009,23 +1009,23 @@ Setting up instances
}
-.. http:post:: [/instances/$INSTANCE]/private/login
+.. http:post:: [/instances/$INSTANCE]/private/token
**Request:**
- The request must be a `LoginRequest`.
+ The request must be a `LoginTokenRequest`.
**Response:**
:http:statuscode:`200 Ok`:
The backend is returning the access token in a
- `LoginSuccessResponse`.
+ `LoginTokenSuccessResponse`.
**Details:**
- .. ts:def:: LoginRequest
+ .. ts:def:: LoginTokenRequest
- interface LoginRequest {
+ interface LoginTokenRequest {
// Scope of the token (which kinds of operations it will allow)
scope: "readonly" | "write";
@@ -1038,9 +1038,9 @@ Setting up instances
refreshable?: boolean;
}
- .. ts:def:: LoginSuccessResponse
+ .. ts:def:: LoginTokenSuccessResponse
- interface LoginSuccessResponse {
+ interface LoginTokenSuccessResponse {
// The bearer token that can be used to access resources
// that are in scope for some time.
access_token: string;
@@ -1056,6 +1056,13 @@ Setting up instances
refreshable: boolean;
}
+.. http:delete:: [/instances/$INSTANCE]/private/token
+
+ **Response:**
+
+ :http:statuscode:`204 No content`:
+ The access token used to authorize this request was revoked.
+
.. http:patch:: /management/instances/$INSTANCE
.. http:patch:: [/instances/$INSTANCE]/private