Add authentication and authorization

This commit is contained in:
2020-10-02 17:47:13 +02:00
parent 60dfea50c4
commit b28dbba746
9 changed files with 92 additions and 13 deletions

View File

@ -244,12 +244,12 @@ paths:
'200':
description: >
Successfully authenticated.
The session ID is returned in a cookie named `connect.sid`. You need to include this cookie in subsequent requests.
The session ID is returned in a cookie named `jwt`. You need to include this cookie in subsequent requests.
headers:
Set-Cookie:
schema:
type: string
example: connect.sid=abcde12345; Path=/; HttpOnly
example: jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiJhZG1pbiIsImlhdCI6MTYwMTY1MDYwNSwiZXhwIjoxNjAxNjU0MjA1fQ.uGvOlBAZdbPT8U9s7jEt5PUWyxLrpgaf02EoPVC_Zlsd; Path=/; HttpOnly
/auth/logout:
get:
summary: Logs the user out and invalidates the session on the server
@ -345,7 +345,7 @@ components:
cookieAuth: # arbitrary name for the security scheme; will be used in the "security" key later
type: apiKey
in: cookie
name: connect.sid # cookie name
name: jwt # cookie name
schemas:
QueueEntry:
type: object