added refresh tocken
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
definitions:
|
||||
internal_auth.AuthResponse:
|
||||
properties:
|
||||
refresh_token:
|
||||
example: dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4=
|
||||
type: string
|
||||
token:
|
||||
example: eyJhbGciOiJIUzI1NiIs...
|
||||
type: string
|
||||
@@ -25,6 +28,14 @@ definitions:
|
||||
- email
|
||||
- password
|
||||
type: object
|
||||
internal_auth.RefreshRequest:
|
||||
properties:
|
||||
refresh_token:
|
||||
example: dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4=
|
||||
type: string
|
||||
required:
|
||||
- refresh_token
|
||||
type: object
|
||||
internal_auth.RegisterRequest:
|
||||
properties:
|
||||
email:
|
||||
@@ -117,6 +128,36 @@ paths:
|
||||
summary: Epta get current user
|
||||
tags:
|
||||
- auth
|
||||
/api/auth/refresh:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get a new access token using a refresh token
|
||||
parameters:
|
||||
- description: Refresh token
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/internal_auth.RefreshRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/internal_auth.AuthResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/internal_auth.ErrorResponse'
|
||||
"401":
|
||||
description: Unauthorized
|
||||
schema:
|
||||
$ref: '#/definitions/internal_auth.ErrorResponse'
|
||||
summary: Refresh epta token
|
||||
tags:
|
||||
- auth
|
||||
/api/auth/register:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user