Reauth endpoint

This commit is contained in:
2024-07-28 22:37:12 +02:00
parent 7723dd0722
commit 9828ee762a
9 changed files with 201 additions and 26 deletions
+51 -2
View File
@@ -310,6 +310,45 @@ paths:
value: { "code": "NotFound", "entity": "post" }
tags:
- Post
/refresh:
post:
summary: Refresh
description: Token refresh.
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RefreshRequest"
responses:
200:
description: Success.
content:
application/json:
schema:
$ref: "#/components/schemas/LoginResponse"
400:
description: Missing fields.
content:
application/json:
schema:
$ref: "#/components/schemas/MissingFieldResponse"
examples:
Missing fields:
value: { "code": "MissingField", "fields": ["refreshToken"] }
500:
description: Failed.
content:
application/json:
schema:
$ref: "#/components/schemas/FailedResponse"
examples:
Failed:
value: { "code": "Failed", "message": "Refresh failed" }
tags:
- Refresh
/register:
post:
summary: Register
@@ -678,8 +717,7 @@ components:
UnauthorizedResponse:
type: object
properties:
code:
type: Unauthorized
code: type:NotAllowed
message:
type: string
FailedResponse:
@@ -731,6 +769,8 @@ components:
$ref: "#/components/schemas/UserResponse"
token:
type: string
refreshToken:
type: string
UserResponse:
type: object
properties:
@@ -855,6 +895,14 @@ components:
properties:
content:
type: string
RefreshRequest:
type: object
required:
- refreshToken
properties:
refreshToken:
type: string
format: uuid4
securitySchemes:
BasicAuth:
type: apiKey
@@ -864,4 +912,5 @@ tags:
- name: Login/Logout
- name: Post
- name: Register
- name: Refresh
- name: User
File diff suppressed because one or more lines are too long