From 648613e24c8afe5fd3c599def61b33ccf7bcb96c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 29 Jul 2024 20:04:03 +0900 Subject: feat: authenticate WebSocket connection by short-lived access token --- openapi.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'openapi.yaml') diff --git a/openapi.yaml b/openapi.yaml index fa6c8d0..739f013 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -47,6 +47,40 @@ paths: example: "Invalid credentials" required: - message + /token: + get: + summary: Get a short-lived access token + parameters: + - in: header + name: Authorization + schema: + type: string + required: true + responses: + '200': + description: Successfully authenticated + content: + application/json: + schema: + type: object + properties: + token: + type: string + example: "xxxxx.xxxxx.xxxxx" + required: + - token + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: "Forbidden operation" + required: + - message /games: get: summary: List games -- cgit v1.2.3-70-g09d2