Change password
Change password of an existing user
Functional design
POST /api/v2/apps/{owner}/{app}/users/change-password
Headers
| Key | Value |
|---|---|
| Content-Type | application/json |
Body
JSON object:
{
"login": "{login}",
"oldPassword": "{old-password}",
"newPassword": "{new-password}",
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| Path | ||
| owner | string | name of a user who owns the application |
| app | string | name of an application |
| Body | ||
| login | string | login of the user |
| old-password | string | old password of the user |
| new-password | string | new password of the user |
Result
| Code | Description | Body |
|---|---|---|
| 200 | OK | |
| 400 | Bad Request | error object |
| 401 | Unauthorized | error object |
| 403 | Forbidden | error object |
| 429 | Too may requests, rate limiting | error object |
| 500+ | Server errors / service unavailable | error object |
Technical design
Components
-
pkg/router
- URL path handler
~cmp.routerUsersChangePasswordPathHandler~covrd1✅:- parses the request Body and URL parameters; calculates pseudo-wsid;
- sends v2 request
c.registry.ChangePasswordto Command Processor
- URL path handler
-
pkg/sys/it
- integration test for /users
~it.TestQueryProcessor2_UsersChangePassword~covrd2✅
- integration test for /users