UNPKG

@experium/nest-bruteforce-guard

Version:
13 lines (12 loc) 777 B
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; }