recaptcha-node
Version:
A Node.js library to verify reCAPTCHA v2/v3 response tokens received from a client.
28 lines • 919 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecaptchaV3Result = exports.RecaptchaV2Result = exports.RecaptchaResult = void 0;
class RecaptchaResult {
constructor(attrs) {
this.success = attrs.success;
this.challengeTimestamp = attrs.challenge_ts;
this.errorCodes = attrs['error-codes'];
}
}
exports.RecaptchaResult = RecaptchaResult;
class RecaptchaV2Result extends RecaptchaResult {
constructor(attrs) {
super(attrs);
this.apkPackageName = attrs.apk_package_name;
}
}
exports.RecaptchaV2Result = RecaptchaV2Result;
class RecaptchaV3Result extends RecaptchaResult {
constructor(attrs) {
super(attrs);
this.action = attrs.action;
this.hostname = attrs.hostname;
this.score = attrs.score;
}
}
exports.RecaptchaV3Result = RecaptchaV3Result;
//# sourceMappingURL=recaptcha-result.js.map