From 95f6895514c5164b2c62e82f65976a1002faee6a Mon Sep 17 00:00:00 2001 From: ByteDream Date: Tue, 15 Feb 2022 16:26:04 +0100 Subject: [PATCH] Added logout and additional login content --- api.yaml | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/api.yaml b/api.yaml index de78739..bec48e9 100644 --- a/api.yaml +++ b/api.yaml @@ -25,6 +25,10 @@ paths: responses: 200: description: Logged in + content: + application/json: + schema: + $ref: '#/components/schemas/Author' headers: Set-Cookie: schema: @@ -33,6 +37,20 @@ paths: 401: description: Login failed + /api/logout: + get: + summary: Logs out and invalidates the session_id cookie + security: + - session_id: [] + responses: + 307: + description: Logged out + headers: + Location: + schema: + type: string + description: Path to home / root + /api/authors: get: summary: Get authors @@ -156,7 +174,7 @@ paths: type: number description: The id of the article security: - - cookie: [] + - session_id: [] responses: 200: description: OK @@ -235,7 +253,7 @@ paths: type: string description: The article itself, formatted as markdown. Must be encoded as base64 security: - - cookie: [] + - session_id: [] responses: 201: description: The article was created @@ -295,7 +313,7 @@ paths: nullable: true security: - - cookie: [] + - session_id: [] responses: 200: description: The article was edited @@ -322,7 +340,7 @@ paths: type: number description: Id of the article to delete security: - - cookie: [] + - session_id: [] responses: 200: description: The article was deleted @@ -346,7 +364,7 @@ paths: type: number description: Limit of assets to return security: - - cookie: [] + - session_id: [] responses: 200: description: All assets of the article @@ -374,7 +392,7 @@ paths: format: binary description: The file itself security: - - cookie: [] + - session_id: [] responses: 201: description: The asset was created / uploaded @@ -400,7 +418,7 @@ paths: type: number description: Id of the assets to delete security: - - cookie: [] + - session_id: [] responses: 200: description: The asset was sucessfully deleted @@ -488,7 +506,7 @@ components: type: string description: Static link to the asset securitySchemes: - cookie: + session_id: type: apiKey in: cookie name: session_id