From 34a2c029b793ebddfdd5142a80666b72aab2b496 Mon Sep 17 00:00:00 2001 From: bytedream Date: Fri, 21 Jan 2022 21:49:04 +0100 Subject: [PATCH] Added login --- api.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/api.yaml b/api.yaml index 89152f3..ba8c9f1 100644 --- a/api.yaml +++ b/api.yaml @@ -6,6 +6,33 @@ info: servers: - url: 'http://localhost:8080' paths: + /api/login: + post: + summary: Login to an author account + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + username: + type: string + description: Username of the user / author which logs in + password: + type: string + description: Password of the user + responses: + 200: + description: Logged in + headers: + Set-Cookie: + schema: + type: string + description: The session_id cookie to authenticate + 401: + description: Login failed + /api/recent: get: summary: Get recent articles