Added logout and additional login content

This commit is contained in:
2022-02-15 16:26:04 +01:00
parent 293fdf4c0e
commit 95f6895514

View File

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