2025-04-26 18:58:47 +00:00
|
|
|
UserLogin:
|
2025-05-03 02:37:47 +00:00
|
|
|
get:
|
2025-04-26 18:58:47 +00:00
|
|
|
tags:
|
|
|
|
|
- login
|
|
|
|
|
summary: Log in to the site
|
|
|
|
|
description: Log in to the site through a code from the server
|
|
|
|
|
operationId: login
|
2025-05-03 02:37:47 +00:00
|
|
|
parameters:
|
|
|
|
|
- $ref: '#/components/parameters/Code'
|
2025-04-26 18:58:47 +00:00
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Logged in
|
|
|
|
|
content:
|
2025-05-03 02:37:47 +00:00
|
|
|
application/text:
|
2025-04-26 18:58:47 +00:00
|
|
|
schema:
|
2025-05-03 02:37:47 +00:00
|
|
|
type: string
|
|
|
|
|
description: A JWT token for this user
|
2025-04-26 18:58:47 +00:00
|
|
|
'401':
|
|
|
|
|
description: Login failed - Invalid credentials
|
|
|
|
|
content:
|
2025-05-03 02:37:47 +00:00
|
|
|
application/text:
|
2025-04-26 18:58:47 +00:00
|
|
|
schema:
|
|
|
|
|
$ref: '../generic/errors.yml#/components/schemas/ApiError'
|
|
|
|
|
default:
|
|
|
|
|
description: Unexpected error
|
|
|
|
|
content:
|
2025-05-03 02:37:47 +00:00
|
|
|
application/text:
|
2025-04-26 18:58:47 +00:00
|
|
|
schema:
|
|
|
|
|
$ref: '../generic/errors.yml#/components/schemas/ApiError'
|
2025-05-03 02:37:47 +00:00
|
|
|
RequestNewUserLogin:
|
|
|
|
|
get:
|
2025-04-26 18:58:47 +00:00
|
|
|
tags:
|
|
|
|
|
- login
|
2025-05-03 02:37:47 +00:00
|
|
|
summary: Request a login
|
|
|
|
|
description: Request a code, that can be used to log in
|
|
|
|
|
operationId: requestLogin
|
|
|
|
|
parameters:
|
2025-05-23 23:33:36 +00:00
|
|
|
- name: Authorization
|
|
|
|
|
in: header
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
description: Secret
|
2025-05-03 02:37:47 +00:00
|
|
|
- $ref: '../generic/parameters.yml#/components/parameters/Uuid'
|
2025-04-26 18:58:47 +00:00
|
|
|
responses:
|
|
|
|
|
'200':
|
|
|
|
|
description: Success
|
2025-05-03 02:37:47 +00:00
|
|
|
content:
|
|
|
|
|
application/text:
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
description: code to log in with
|
|
|
|
|
'401':
|
|
|
|
|
description: Login failed - Invalid secret
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '../generic/errors.yml#/components/schemas/ApiError'
|
2025-04-26 18:58:47 +00:00
|
|
|
default:
|
|
|
|
|
description: Unexpected error
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '../generic/errors.yml#/components/schemas/ApiError'
|
|
|
|
|
components:
|
2025-05-03 02:37:47 +00:00
|
|
|
parameters:
|
|
|
|
|
Code:
|
|
|
|
|
name: code
|
|
|
|
|
in: path
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
type: string
|
|
|
|
|
description: The code to log in with
|
2025-04-26 18:58:47 +00:00
|
|
|
schemas:
|
|
|
|
|
LoginData:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- loginCode
|
|
|
|
|
properties:
|
|
|
|
|
loginCode:
|
|
|
|
|
type: string
|
|
|
|
|
description: The code to log in
|
|
|
|
|
AddLogin:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- uuid
|
|
|
|
|
properties:
|
|
|
|
|
uuid:
|
|
|
|
|
type: string
|
|
|
|
|
format: uuid
|
|
|
|
|
description: UUID of the user that will get logged in
|