Reauth endpoint
This commit is contained in:
+51
-2
@@ -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
|
||||
|
||||
+18
-10
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user