(domainId: string, code: string, password: string, verifyPassword: string)
| 388 | @param('password', Types.Password) |
| 389 | @param('verifyPassword', Types.Password) |
| 390 | async post(domainId: string, code: string, password: string, verifyPassword: string) { |
| 391 | const tdoc = await token.get(code, token.TYPE_LOSTPASS); |
| 392 | if (!tdoc) throw new InvalidTokenError(token.TYPE_TEXTS[token.TYPE_LOSTPASS], code); |
| 393 | if (password !== verifyPassword) throw new VerifyPasswordError(); |
| 394 | await user.setById(tdoc.uid, { authenticators: [], tfa: false }); |
| 395 | await user.setPassword(tdoc.uid, password); |
| 396 | await token.del(code, token.TYPE_LOSTPASS); |
| 397 | this.response.redirect = this.url('homepage'); |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | class UserDetailHandler extends Handler { |
nothing calls this directly
no test coverage detected