@experium/nest-bruteforce-guard
Version:
Authorization protection from bruteforce
13 lines (12 loc) • 777 B
TypeScript
import { ExecutionContext } from '@nestjs/common';
import { AbstractExceptionCatcher } from './abstract-exception.catcher';
import { ExceptionCatcherRegistry } from './exception-catcher.registry';
import { LoginAttempt } from '../entity/login-attempt.entity';
import { BruteforceGuardConfiguration } from '../config/bruteforce-quard.configuration';
import { BadPasswordException } from '../exception/bad-password.exception';
export declare class BadPasswordExceptionCatcher extends AbstractExceptionCatcher {
readonly config: BruteforceGuardConfiguration;
constructor(registry: ExceptionCatcherRegistry, config: BruteforceGuardConfiguration);
supports(exception: any): boolean;
catch(exception: BadPasswordException, context: ExecutionContext): LoginAttempt;
}