@nestlab/google-recaptcha
Version:
Google recaptcha module for NestJS.
12 lines (11 loc) • 745 B
TypeScript
import { VerifyResponseOptions } from '../../interfaces/verify-response-decorator-options';
import { ScoreValidator } from '../../types';
import { RecaptchaVerificationResult } from '../../models/recaptcha-verification-result';
import { RecaptchaConfigRef } from '../../models/recaptcha-config-ref';
export declare abstract class AbstractGoogleRecaptchaValidator<Res> {
protected readonly options: RecaptchaConfigRef;
protected constructor(options: RecaptchaConfigRef);
abstract validate(options: VerifyResponseOptions): Promise<RecaptchaVerificationResult<Res>>;
protected isValidAction(action: string, options?: VerifyResponseOptions): boolean;
protected isValidScore(score: number, validator?: ScoreValidator): boolean;
}