mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: Rate limiter on requests and login attempts.
This commit is contained in:
@@ -7,6 +7,7 @@ import AuthenticationService from 'services/Authentication';
|
||||
import { ILoginDTO, ISystemUser, IRegisterOTD } from 'interfaces';
|
||||
import { ServiceError, ServiceErrors } from "exceptions";
|
||||
import { DATATYPES_LENGTH } from 'data/DataTypes';
|
||||
import LoginThrottlerMiddleware from 'api/middleware/LoginThrottlerMiddleware';
|
||||
|
||||
@Service()
|
||||
export default class AuthenticationController extends BaseController{
|
||||
@@ -23,6 +24,7 @@ export default class AuthenticationController extends BaseController{
|
||||
'/login',
|
||||
this.loginSchema,
|
||||
this.validationResult,
|
||||
LoginThrottlerMiddleware,
|
||||
asyncMiddleware(this.login.bind(this))
|
||||
);
|
||||
router.post(
|
||||
|
||||
Reference in New Issue
Block a user