Added login

This commit is contained in:
2022-01-21 21:49:04 +01:00
parent 8160227ffa
commit 34a2c029b7

View File

@@ -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