@nestlab/google-recaptcha
Version:
Google recaptcha module for NestJS.
22 lines (21 loc) • 1.07 kB
TypeScript
import { Logger } from '@nestjs/common';
import { VerifyResponseOptions } from '../../interfaces/verify-response-decorator-options';
import { VerifyResponseV3 } from '../../interfaces/verify-response';
import { AbstractGoogleRecaptchaValidator } from './abstract-google-recaptcha-validator';
import { RecaptchaVerificationResult } from '../../models/recaptcha-verification-result';
import { AxiosInstance } from 'axios';
import { RecaptchaConfigRef } from '../../models/recaptcha-config-ref';
export declare class GoogleRecaptchaValidator extends AbstractGoogleRecaptchaValidator<VerifyResponseV3> {
private readonly axios;
private readonly logger;
private readonly defaultNetwork;
private readonly headers;
constructor(axios: AxiosInstance, logger: Logger, configRef: RecaptchaConfigRef);
/**
* @throws GoogleRecaptchaNetworkException
* @param {VerifyResponseOptions} options
*/
validate(options: VerifyResponseOptions): Promise<RecaptchaVerificationResult<VerifyResponseV3>>;
private verifyResponse;
private isUseV3;
}