tsk-30: Update password (#33)
Closes #30 Reviewed-on: phoenix/textsender-auth#33 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
basePath: /api/v1
|
||||
definitions:
|
||||
git_kundeng_us_phoenix_textsender-models_tx0_user.User:
|
||||
properties:
|
||||
date_created:
|
||||
type: string
|
||||
first_name:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
last_login:
|
||||
type: string
|
||||
last_name:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
phone_number:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
type: object
|
||||
handler.LoginAccount:
|
||||
properties:
|
||||
password:
|
||||
@@ -89,6 +108,26 @@ definitions:
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
handler.UpdatePasswordRequest:
|
||||
properties:
|
||||
confirmed_password:
|
||||
type: string
|
||||
current_password:
|
||||
type: string
|
||||
updated_password:
|
||||
type: string
|
||||
user_id:
|
||||
type: string
|
||||
type: object
|
||||
handler.UpdatePasswordResponse:
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/git_kundeng_us_phoenix_textsender-models_tx0_user.User'
|
||||
type: array
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
token.Login:
|
||||
properties:
|
||||
access_token:
|
||||
@@ -97,6 +136,8 @@ definitions:
|
||||
type: integer
|
||||
token_type:
|
||||
type: string
|
||||
user_id:
|
||||
type: string
|
||||
type: object
|
||||
user.ServiceUser:
|
||||
properties:
|
||||
@@ -280,6 +321,38 @@ paths:
|
||||
summary: Obtain a refresh token
|
||||
tags:
|
||||
- refresh
|
||||
/user/password/update:
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Update the password of a regular account (requires JWT)
|
||||
parameters:
|
||||
- description: Needed data to update password
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/handler.UpdatePasswordRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/handler.UpdatePasswordResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/handler.UpdatePasswordResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/handler.UpdatePasswordResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: Update Password
|
||||
tags:
|
||||
- users
|
||||
securityDefinitions:
|
||||
BearerAuth:
|
||||
description: JWT Bearer Token
|
||||
|
||||
Reference in New Issue
Block a user