Skip to main content

Change password

Change password of an existing user

Functional design

POST /api/v2/apps/{owner}/{app}/users/change-password

Headers

KeyValue
Content-Typeapplication/json

Body

JSON object:

{
"login": "{login}",
"oldPassword": "{old-password}",
"newPassword": "{new-password}",
}

Parameters

ParameterTypeDescription
Path
ownerstringname of a user who owns the application
appstringname of an application
Body
loginstringlogin of the user
old-passwordstringold password of the user
new-passwordstringnew password of the user

Result

CodeDescriptionBody
200OK
400Bad Requesterror object
401Unauthorizederror object
403Forbiddenerror object
429Too may requests, rate limitingerror object
500+Server errors / service unavailableerror 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.ChangePassword to Command Processor
  • pkg/sys/it

    • integration test for /users
      • ~it.TestQueryProcessor2_UsersChangePassword~covrd2

Footnotes

  1. [~server.users/cmp.routerUsersChangePasswordPathHandler~impl] pkg/router/impl_apiv2.go:114:impl, pkg/router/impl_apiv2.go:196:impl

  2. [~server.users/it.TestQueryProcessor2_UsersChangePassword~impl] pkg/sys/it/impl_changepassword_test.go:39:impl