perf: 登录失败增加重试次数限制及冷却时间

This commit is contained in:
xiaojunnuo
2024-11-28 11:10:57 +08:00
parent 8002a56efc
commit 954b6df360
3 changed files with 103 additions and 2 deletions
@@ -0,0 +1,12 @@
import { Constants } from '../constants.js';
import { BaseException } from './base-exception.js';
/**
* 通用异常
*/
export class LoginErrorException extends BaseException {
leftCount: number;
constructor(message, leftCount: number) {
super('LoginErrorException', Constants.res.loginError.code, message ? message : Constants.res.loginError.message);
this.leftCount = leftCount;
}
}