aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/routing.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-09-04 15:16:13 +0100
committerGitHub <noreply@github.com>2020-09-04 15:16:13 +0100
commit5076925c184998414c3691e97fc21b554abf4a55 (patch)
treeb4da4d8a3015166e16eb9a6009f733653f0485bc /clientapi/routing/routing.go
parentca8dcf46b746686e213b184c3ae42ba0be17b46b (diff)
Password changes (#1397)
* User API support for password changes * Password changes in client API * Update sytest-whitelist * Remove debug logging * Default logout_devices to true * Fix deleting devices by local part
Diffstat (limited to 'clientapi/routing/routing.go')
-rw-r--r--clientapi/routing/routing.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go
index 708f6fee..b29fccf2 100644
--- a/clientapi/routing/routing.go
+++ b/clientapi/routing/routing.go
@@ -417,6 +417,15 @@ func Setup(
}),
).Methods(http.MethodGet, http.MethodOptions)
+ r0mux.Handle("/account/password",
+ httputil.MakeAuthAPI("password", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse {
+ if r := rateLimits.rateLimit(req); r != nil {
+ return *r
+ }
+ return Password(req, userAPI, accountDB, device, cfg)
+ }),
+ ).Methods(http.MethodPost, http.MethodOptions)
+
// Stub endpoints required by Riot
r0mux.Handle("/login",