forked from mirrors/homebox
feat: change password (#35)
* refactor: implement factories for testing * add additional factories * change protection for dropFields * prevent timed attacks on login * use switch instead of else-if * API implementation for changing password * add change-password dialog
This commit is contained in:
parent
a6e3989aee
commit
a6d2fd45df
19 changed files with 458 additions and 149 deletions
|
@ -353,6 +353,13 @@ definitions:
|
|||
version:
|
||||
type: string
|
||||
type: object
|
||||
v1.ChangePassword:
|
||||
properties:
|
||||
current:
|
||||
type: string
|
||||
new:
|
||||
type: string
|
||||
type: object
|
||||
v1.GroupInvitation:
|
||||
properties:
|
||||
expiresAt:
|
||||
|
@ -877,6 +884,23 @@ paths:
|
|||
summary: Retrieves the basic information about the API
|
||||
tags:
|
||||
- Base
|
||||
/v1/users/change-password:
|
||||
put:
|
||||
parameters:
|
||||
- description: Password Payload
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/v1.ChangePassword'
|
||||
responses:
|
||||
"204":
|
||||
description: ""
|
||||
security:
|
||||
- Bearer: []
|
||||
summary: Updates the users password
|
||||
tags:
|
||||
- User
|
||||
/v1/users/login:
|
||||
post:
|
||||
consumes:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue