aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/users/index.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts
index 98eb2beed..b30f42b43 100644
--- a/server/controllers/api/users/index.ts
+++ b/server/controllers/api/users/index.ts
@@ -17,7 +17,6 @@ import {
17 paginationValidator, 17 paginationValidator,
18 setDefaultPagination, 18 setDefaultPagination,
19 setDefaultSort, 19 setDefaultSort,
20 token,
21 userAutocompleteValidator, 20 userAutocompleteValidator,
22 usersAddValidator, 21 usersAddValidator,
23 usersGetValidator, 22 usersGetValidator,
@@ -50,6 +49,7 @@ import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model'
50import { UserRegister } from '../../../../shared/models/users/user-register.model' 49import { UserRegister } from '../../../../shared/models/users/user-register.model'
51import { MUser, MUserAccountDefault } from '@server/typings/models' 50import { MUser, MUserAccountDefault } from '@server/typings/models'
52import { Hooks } from '@server/lib/plugins/hooks' 51import { Hooks } from '@server/lib/plugins/hooks'
52import { handleIdAndPassLogin } from '@server/lib/auth'
53 53
54const auditLogger = auditLoggerFactory('users') 54const auditLogger = auditLoggerFactory('users')
55 55
@@ -170,7 +170,17 @@ usersRouter.post('/:id/verify-email',
170 170
171usersRouter.post('/token', 171usersRouter.post('/token',
172 loginRateLimiter, 172 loginRateLimiter,
173 token, 173 handleIdAndPassLogin,
174 tokenSuccess
175)
176usersRouter.post('/token',
177 loginRateLimiter,
178 handleIdAndPassLogin,
179 tokenSuccess
180)
181usersRouter.post('/revoke-token',
182 loginRateLimiter,
183 handleIdAndPassLogin,
174 tokenSuccess 184 tokenSuccess
175) 185)
176// TODO: Once https://github.com/oauthjs/node-oauth2-server/pull/289 is merged, implement revoke token route 186// TODO: Once https://github.com/oauthjs/node-oauth2-server/pull/289 is merged, implement revoke token route