@nestlab/google-recaptcha 3.6.0 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +52 -0
- package/decorators/recaptcha-result.js +0 -1
- package/decorators/recaptcha.js +0 -1
- package/decorators/set-recaptcha-options.js +0 -1
- package/enums/classification-reason.js +0 -1
- package/enums/error-code.js +0 -1
- package/enums/google-recaptcha-context.js +0 -1
- package/enums/google-recaptcha-enterprise-reason.js +0 -1
- package/enums/google-recaptcha-network.js +0 -1
- package/exceptions/google-recaptcha-network.exception.js +0 -1
- package/exceptions/google-recaptcha.exception.js +0 -1
- package/google-recaptcha.module.js +10 -1
- package/guards/google-recaptcha.guard.d.ts +3 -3
- package/guards/google-recaptcha.guard.js +11 -10
- package/helpers/get-error-info.js +0 -1
- package/helpers/load-module.js +0 -1
- package/helpers/xor.js +0 -1
- package/index.d.ts +1 -0
- package/index.js +3 -2
- package/interfaces/google-recaptcha-enterprise-options.js +0 -1
- package/interfaces/google-recaptcha-guard-options.d.ts +2 -2
- package/interfaces/google-recaptcha-guard-options.js +0 -1
- package/interfaces/google-recaptcha-module-options.d.ts +2 -3
- package/interfaces/google-recaptcha-module-options.js +0 -1
- package/interfaces/google-recaptcha-validator-options.js +0 -1
- package/interfaces/literal-object.js +0 -1
- package/interfaces/verify-response-decorator-options.d.ts +1 -1
- package/interfaces/verify-response-decorator-options.js +0 -1
- package/interfaces/verify-response-enterprise.js +0 -1
- package/interfaces/verify-response.js +0 -1
- package/models/recaptcha-config-ref.d.ts +12 -0
- package/models/recaptcha-config-ref.js +30 -0
- package/models/recaptcha-verification-result.js +0 -1
- package/package.json +1 -1
- package/provider.declarations.js +0 -1
- package/services/enterprise-reason.transformer.js +0 -1
- package/services/recaptcha-request.resolver.js +0 -1
- package/services/recaptcha-validator.resolver.d.ts +3 -3
- package/services/recaptcha-validator.resolver.js +8 -11
- package/services/validators/abstract-google-recaptcha-validator.d.ts +3 -3
- package/services/validators/abstract-google-recaptcha-validator.js +2 -3
- package/services/validators/google-recaptcha-enterprise.validator.d.ts +2 -2
- package/services/validators/google-recaptcha-enterprise.validator.js +12 -11
- package/services/validators/google-recaptcha.validator.d.ts +2 -2
- package/services/validators/google-recaptcha.validator.js +10 -10
- package/types.d.ts +1 -0
- package/types.js +0 -1
- package/decorators/recaptcha-result.js.map +0 -1
- package/decorators/recaptcha.js.map +0 -1
- package/decorators/set-recaptcha-options.js.map +0 -1
- package/enums/classification-reason.js.map +0 -1
- package/enums/error-code.js.map +0 -1
- package/enums/google-recaptcha-context.js.map +0 -1
- package/enums/google-recaptcha-enterprise-reason.js.map +0 -1
- package/enums/google-recaptcha-network.js.map +0 -1
- package/exceptions/google-recaptcha-network.exception.js.map +0 -1
- package/exceptions/google-recaptcha.exception.js.map +0 -1
- package/google-recaptcha.module.js.map +0 -1
- package/guards/google-recaptcha.guard.js.map +0 -1
- package/helpers/get-error-info.js.map +0 -1
- package/helpers/load-module.js.map +0 -1
- package/helpers/xor.js.map +0 -1
- package/index.js.map +0 -1
- package/interfaces/google-recaptcha-enterprise-options.js.map +0 -1
- package/interfaces/google-recaptcha-guard-options.js.map +0 -1
- package/interfaces/google-recaptcha-module-options.js.map +0 -1
- package/interfaces/google-recaptcha-validator-options.js.map +0 -1
- package/interfaces/literal-object.js.map +0 -1
- package/interfaces/verify-response-decorator-options.js.map +0 -1
- package/interfaces/verify-response-enterprise.js.map +0 -1
- package/interfaces/verify-response.js.map +0 -1
- package/models/recaptcha-verification-result.js.map +0 -1
- package/provider.declarations.js.map +0 -1
- package/services/enterprise-reason.transformer.js.map +0 -1
- package/services/recaptcha-request.resolver.js.map +0 -1
- package/services/recaptcha-validator.resolver.js.map +0 -1
- package/services/validators/abstract-google-recaptcha-validator.js.map +0 -1
- package/services/validators/google-recaptcha-enterprise.validator.js.map +0 -1
- package/services/validators/google-recaptcha.validator.js.map +0 -1
- package/types.js.map +0 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ This package provides protection for endpoints using [reCAPTCHA](https://www.goo
|
|
|
27
27
|
* [Graphql application](#usage-in-graphql-application)
|
|
28
28
|
* [Validate in service](#validate-in-service)
|
|
29
29
|
* [Validate in service (Enterprise)](#validate-in-service-enterprise)
|
|
30
|
+
* [Dynamic Recaptcha configuration](#dynamic-recaptcha-configuration)
|
|
30
31
|
* [Error handling](#error-handling)
|
|
31
32
|
* [Contribution](#contribution)
|
|
32
33
|
* [License](#license)
|
|
@@ -471,6 +472,57 @@ export class SomeService {
|
|
|
471
472
|
}
|
|
472
473
|
```
|
|
473
474
|
|
|
475
|
+
### Dynamic Recaptcha configuration
|
|
476
|
+
The `RecaptchaConfigRef` class provides a convenient way to modify Recaptcha validation parameters within your application.
|
|
477
|
+
This can be particularly useful in scenarios where the administration of Recaptcha is managed dynamically, such as by an administrator.
|
|
478
|
+
The class exposes methods that allow the customization of various Recaptcha options.
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
**RecaptchaConfigRef API:**
|
|
482
|
+
|
|
483
|
+
```typescript
|
|
484
|
+
@Injectable()
|
|
485
|
+
class RecaptchaConfigRef {
|
|
486
|
+
// Sets the secret key for Recaptcha validation.
|
|
487
|
+
setSecretKey(secretKey: string): this;
|
|
488
|
+
|
|
489
|
+
// Sets enterprise-specific options for Recaptcha validation
|
|
490
|
+
setEnterpriseOptions(options: GoogleRecaptchaEnterpriseOptions): this;
|
|
491
|
+
|
|
492
|
+
// Sets the score threshold for Recaptcha validation.
|
|
493
|
+
setScore(score: ScoreValidator): this;
|
|
494
|
+
|
|
495
|
+
// Sets conditions under which Recaptcha validation should be skipped.
|
|
496
|
+
setSkipIf(skipIf: SkipIfValue): this;
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
**Usage example:**
|
|
501
|
+
|
|
502
|
+
```typescript
|
|
503
|
+
@Injectable()
|
|
504
|
+
export class RecaptchaAdminService implements OnApplicationBootstrap {
|
|
505
|
+
constructor(private readonly recaptchaConfigRef: RecaptchaConfigRef) {
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
async onApplicationBootstrap(): Promise<void> {
|
|
509
|
+
// TODO: Pull recaptcha configs from your database
|
|
510
|
+
|
|
511
|
+
this.recaptchaConfigRef
|
|
512
|
+
.setSecretKey('SECRET_KEY_VALUE')
|
|
513
|
+
.setScore(0.3);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
async updateSecretKey(secretKey: string): Promise<void> {
|
|
517
|
+
// TODO: Save new secret key to your database
|
|
518
|
+
|
|
519
|
+
this.recaptchaConfigRef.setSecretKey(secretKey);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
After call `this.recaptchaConfigRef.setSecretKey(...)` - `@Recaptcha` guard and `GoogleRecaptchaValidator` will use new secret key.
|
|
525
|
+
|
|
474
526
|
### Error handling
|
|
475
527
|
|
|
476
528
|
**GoogleRecaptchaException**
|
|
@@ -12,4 +12,3 @@ exports.RecaptchaResult = (0, common_1.createParamDecorator)((data, context) =>
|
|
|
12
12
|
return (_d = (_c = (_b = (_a = (0, load_module_1.loadModule)('@nestjs/graphql', true).GqlExecutionContext.create(context).getContext().req) === null || _a === void 0 ? void 0 : _a.connection) === null || _b === void 0 ? void 0 : _b._httpMessage) === null || _c === void 0 ? void 0 : _c.req) === null || _d === void 0 ? void 0 : _d.recaptchaValidationResult;
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
//# sourceMappingURL=recaptcha-result.js.map
|
package/decorators/recaptcha.js
CHANGED
|
@@ -8,4 +8,3 @@ function Recaptcha(options) {
|
|
|
8
8
|
return (0, common_1.applyDecorators)((0, set_recaptcha_options_1.SetRecaptchaOptions)(options), (0, common_1.UseGuards)(google_recaptcha_guard_1.GoogleRecaptchaGuard));
|
|
9
9
|
}
|
|
10
10
|
exports.Recaptcha = Recaptcha;
|
|
11
|
-
//# sourceMappingURL=recaptcha.js.map
|
|
@@ -10,4 +10,3 @@ var ClassificationReason;
|
|
|
10
10
|
ClassificationReason["UNEXPECTED_USAGE_PATTERNS"] = "UNEXPECTED_USAGE_PATTERNS";
|
|
11
11
|
ClassificationReason["LOW_CONFIDENCE_SCORE"] = "LOW_CONFIDENCE_SCORE";
|
|
12
12
|
})(ClassificationReason = exports.ClassificationReason || (exports.ClassificationReason = {}));
|
|
13
|
-
//# sourceMappingURL=classification-reason.js.map
|
package/enums/error-code.js
CHANGED
|
@@ -6,4 +6,3 @@ var GoogleRecaptchaContext;
|
|
|
6
6
|
GoogleRecaptchaContext["GoogleRecaptcha"] = "GoogleRecaptcha";
|
|
7
7
|
GoogleRecaptchaContext["GoogleRecaptchaEnterprise"] = "GoogleRecaptchaEnterprise";
|
|
8
8
|
})(GoogleRecaptchaContext = exports.GoogleRecaptchaContext || (exports.GoogleRecaptchaContext = {}));
|
|
9
|
-
//# sourceMappingURL=google-recaptcha-context.js.map
|
|
@@ -12,4 +12,3 @@ var GoogleRecaptchaEnterpriseReason;
|
|
|
12
12
|
GoogleRecaptchaEnterpriseReason["Missing"] = "MISSING";
|
|
13
13
|
GoogleRecaptchaEnterpriseReason["BrowserError"] = "BROWSER_ERROR";
|
|
14
14
|
})(GoogleRecaptchaEnterpriseReason = exports.GoogleRecaptchaEnterpriseReason || (exports.GoogleRecaptchaEnterpriseReason = {}));
|
|
15
|
-
//# sourceMappingURL=google-recaptcha-enterprise-reason.js.map
|
|
@@ -6,4 +6,3 @@ var GoogleRecaptchaNetwork;
|
|
|
6
6
|
GoogleRecaptchaNetwork["Google"] = "https://www.google.com/recaptcha/api/siteverify";
|
|
7
7
|
GoogleRecaptchaNetwork["Recaptcha"] = "https://recaptcha.net/recaptcha/api/siteverify";
|
|
8
8
|
})(GoogleRecaptchaNetwork = exports.GoogleRecaptchaNetwork || (exports.GoogleRecaptchaNetwork = {}));
|
|
9
|
-
//# sourceMappingURL=google-recaptcha-network.js.map
|
|
@@ -13,6 +13,7 @@ const https_1 = require("https");
|
|
|
13
13
|
const recaptcha_validator_resolver_1 = require("./services/recaptcha-validator.resolver");
|
|
14
14
|
const enterprise_reason_transformer_1 = require("./services/enterprise-reason.transformer");
|
|
15
15
|
const xor_1 = require("./helpers/xor");
|
|
16
|
+
const recaptcha_config_ref_1 = require("./models/recaptcha-config-ref");
|
|
16
17
|
class GoogleRecaptchaModule {
|
|
17
18
|
static forRoot(options) {
|
|
18
19
|
const providers = [
|
|
@@ -31,6 +32,10 @@ class GoogleRecaptchaModule {
|
|
|
31
32
|
provide: provider_declarations_1.RECAPTCHA_LOGGER,
|
|
32
33
|
useFactory: () => options.logger || new common_1.Logger(),
|
|
33
34
|
},
|
|
35
|
+
{
|
|
36
|
+
provide: recaptcha_config_ref_1.RecaptchaConfigRef,
|
|
37
|
+
useFactory: () => new recaptcha_config_ref_1.RecaptchaConfigRef(options),
|
|
38
|
+
},
|
|
34
39
|
];
|
|
35
40
|
this.validateOptions(options);
|
|
36
41
|
const internalProviders = [
|
|
@@ -54,6 +59,11 @@ class GoogleRecaptchaModule {
|
|
|
54
59
|
useFactory: (options) => options.logger || new common_1.Logger(),
|
|
55
60
|
inject: [provider_declarations_1.RECAPTCHA_OPTIONS],
|
|
56
61
|
},
|
|
62
|
+
{
|
|
63
|
+
provide: recaptcha_config_ref_1.RecaptchaConfigRef,
|
|
64
|
+
useFactory: (opts) => new recaptcha_config_ref_1.RecaptchaConfigRef(opts),
|
|
65
|
+
inject: [provider_declarations_1.RECAPTCHA_OPTIONS],
|
|
66
|
+
},
|
|
57
67
|
google_recaptcha_guard_1.GoogleRecaptchaGuard,
|
|
58
68
|
google_recaptcha_validator_1.GoogleRecaptchaValidator,
|
|
59
69
|
google_recaptcha_enterprise_validator_1.GoogleRecaptchaEnterpriseValidator,
|
|
@@ -139,4 +149,3 @@ GoogleRecaptchaModule.axiosDefaultConfig = {
|
|
|
139
149
|
timeout: 60000,
|
|
140
150
|
httpsAgent: new https_1.Agent({ keepAlive: true }),
|
|
141
151
|
};
|
|
142
|
-
//# sourceMappingURL=google-recaptcha.module.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { CanActivate, ExecutionContext, Logger } from '@nestjs/common';
|
|
2
2
|
import { Reflector } from '@nestjs/core';
|
|
3
3
|
import { RecaptchaRequestResolver } from '../services/recaptcha-request.resolver';
|
|
4
|
-
import { GoogleRecaptchaModuleOptions } from '../interfaces/google-recaptcha-module-options';
|
|
5
4
|
import { RecaptchaValidatorResolver } from '../services/recaptcha-validator.resolver';
|
|
5
|
+
import { RecaptchaConfigRef } from '../models/recaptcha-config-ref';
|
|
6
6
|
export declare class GoogleRecaptchaGuard implements CanActivate {
|
|
7
7
|
private readonly reflector;
|
|
8
8
|
private readonly requestResolver;
|
|
9
9
|
private readonly validatorResolver;
|
|
10
10
|
private readonly logger;
|
|
11
|
-
private readonly
|
|
12
|
-
constructor(reflector: Reflector, requestResolver: RecaptchaRequestResolver, validatorResolver: RecaptchaValidatorResolver, logger: Logger,
|
|
11
|
+
private readonly configRef;
|
|
12
|
+
constructor(reflector: Reflector, requestResolver: RecaptchaRequestResolver, validatorResolver: RecaptchaValidatorResolver, logger: Logger, configRef: RecaptchaConfigRef);
|
|
13
13
|
canActivate(context: ExecutionContext): Promise<true | never>;
|
|
14
14
|
private resolveLogContext;
|
|
15
15
|
}
|
|
@@ -21,30 +21,32 @@ const recaptcha_request_resolver_1 = require("../services/recaptcha-request.reso
|
|
|
21
21
|
const recaptcha_validator_resolver_1 = require("../services/recaptcha-validator.resolver");
|
|
22
22
|
const google_recaptcha_context_1 = require("../enums/google-recaptcha-context");
|
|
23
23
|
const google_recaptcha_enterprise_validator_1 = require("../services/validators/google-recaptcha-enterprise.validator");
|
|
24
|
+
const recaptcha_config_ref_1 = require("../models/recaptcha-config-ref");
|
|
24
25
|
let GoogleRecaptchaGuard = class GoogleRecaptchaGuard {
|
|
25
|
-
constructor(reflector, requestResolver, validatorResolver, logger,
|
|
26
|
+
constructor(reflector, requestResolver, validatorResolver, logger, configRef) {
|
|
26
27
|
this.reflector = reflector;
|
|
27
28
|
this.requestResolver = requestResolver;
|
|
28
29
|
this.validatorResolver = validatorResolver;
|
|
29
30
|
this.logger = logger;
|
|
30
|
-
this.
|
|
31
|
+
this.configRef = configRef;
|
|
31
32
|
}
|
|
32
33
|
async canActivate(context) {
|
|
33
34
|
const request = this.requestResolver.resolve(context);
|
|
34
|
-
const
|
|
35
|
+
const skipIfValue = this.configRef.valueOf.skipIf;
|
|
36
|
+
const skip = typeof skipIfValue === 'function' ? await skipIfValue(request) : !!skipIfValue;
|
|
35
37
|
if (skip) {
|
|
36
38
|
return true;
|
|
37
39
|
}
|
|
38
40
|
const options = this.reflector.get(provider_declarations_1.RECAPTCHA_VALIDATION_OPTIONS, context.getHandler());
|
|
39
41
|
const [response, remoteIp] = await Promise.all([
|
|
40
|
-
(options === null || options === void 0 ? void 0 : options.response) ? await options.response(request) : await this.
|
|
41
|
-
(options === null || options === void 0 ? void 0 : options.remoteIp) ? await options.remoteIp(request) : await this.
|
|
42
|
+
(options === null || options === void 0 ? void 0 : options.response) ? await options.response(request) : await this.configRef.valueOf.response(request),
|
|
43
|
+
(options === null || options === void 0 ? void 0 : options.remoteIp) ? await options.remoteIp(request) : await this.configRef.valueOf.remoteIp && this.configRef.valueOf.remoteIp(request),
|
|
42
44
|
]);
|
|
43
|
-
const score = (options === null || options === void 0 ? void 0 : options.score) || this.
|
|
45
|
+
const score = (options === null || options === void 0 ? void 0 : options.score) || this.configRef.valueOf.score;
|
|
44
46
|
const action = options === null || options === void 0 ? void 0 : options.action;
|
|
45
47
|
const validator = this.validatorResolver.resolve();
|
|
46
48
|
request.recaptchaValidationResult = await validator.validate({ response, remoteIp, score, action });
|
|
47
|
-
if (this.
|
|
49
|
+
if (this.configRef.valueOf.debug) {
|
|
48
50
|
const loggerCtx = this.resolveLogContext(validator);
|
|
49
51
|
this.logger.debug(request.recaptchaValidationResult.toObject(), `${loggerCtx}.result`);
|
|
50
52
|
}
|
|
@@ -62,11 +64,10 @@ let GoogleRecaptchaGuard = class GoogleRecaptchaGuard {
|
|
|
62
64
|
GoogleRecaptchaGuard = __decorate([
|
|
63
65
|
(0, common_1.Injectable)(),
|
|
64
66
|
__param(3, (0, common_1.Inject)(provider_declarations_1.RECAPTCHA_LOGGER)),
|
|
65
|
-
__param(4, (0, common_1.Inject)(provider_declarations_1.RECAPTCHA_OPTIONS)),
|
|
66
67
|
__metadata("design:paramtypes", [core_1.Reflector,
|
|
67
68
|
recaptcha_request_resolver_1.RecaptchaRequestResolver,
|
|
68
69
|
recaptcha_validator_resolver_1.RecaptchaValidatorResolver,
|
|
69
|
-
common_1.Logger,
|
|
70
|
+
common_1.Logger,
|
|
71
|
+
recaptcha_config_ref_1.RecaptchaConfigRef])
|
|
70
72
|
], GoogleRecaptchaGuard);
|
|
71
73
|
exports.GoogleRecaptchaGuard = GoogleRecaptchaGuard;
|
|
72
|
-
//# sourceMappingURL=google-recaptcha.guard.js.map
|
package/helpers/load-module.js
CHANGED
package/helpers/xor.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export { GoogleRecaptchaValidator } from './services/validators/google-recaptcha
|
|
|
12
12
|
export { GoogleRecaptchaEnterpriseValidator } from './services/validators/google-recaptcha-enterprise.validator';
|
|
13
13
|
export { RecaptchaVerificationResult } from './models/recaptcha-verification-result';
|
|
14
14
|
export { ClassificationReason } from './enums/classification-reason';
|
|
15
|
+
export { RecaptchaConfigRef } from './models/recaptcha-config-ref';
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClassificationReason = exports.RecaptchaVerificationResult = exports.GoogleRecaptchaEnterpriseValidator = exports.GoogleRecaptchaValidator = exports.GoogleRecaptchaNetworkException = exports.GoogleRecaptchaException = exports.GoogleRecaptchaNetwork = exports.ErrorCode = exports.GoogleRecaptchaModule = exports.GoogleRecaptchaGuard = exports.RecaptchaResult = exports.SetRecaptchaOptions = exports.Recaptcha = void 0;
|
|
3
|
+
exports.RecaptchaConfigRef = exports.ClassificationReason = exports.RecaptchaVerificationResult = exports.GoogleRecaptchaEnterpriseValidator = exports.GoogleRecaptchaValidator = exports.GoogleRecaptchaNetworkException = exports.GoogleRecaptchaException = exports.GoogleRecaptchaNetwork = exports.ErrorCode = exports.GoogleRecaptchaModule = exports.GoogleRecaptchaGuard = exports.RecaptchaResult = exports.SetRecaptchaOptions = exports.Recaptcha = void 0;
|
|
4
4
|
var recaptcha_1 = require("./decorators/recaptcha");
|
|
5
5
|
Object.defineProperty(exports, "Recaptcha", { enumerable: true, get: function () { return recaptcha_1.Recaptcha; } });
|
|
6
6
|
var set_recaptcha_options_1 = require("./decorators/set-recaptcha-options");
|
|
@@ -27,4 +27,5 @@ var recaptcha_verification_result_1 = require("./models/recaptcha-verification-r
|
|
|
27
27
|
Object.defineProperty(exports, "RecaptchaVerificationResult", { enumerable: true, get: function () { return recaptcha_verification_result_1.RecaptchaVerificationResult; } });
|
|
28
28
|
var classification_reason_1 = require("./enums/classification-reason");
|
|
29
29
|
Object.defineProperty(exports, "ClassificationReason", { enumerable: true, get: function () { return classification_reason_1.ClassificationReason; } });
|
|
30
|
-
|
|
30
|
+
var recaptcha_config_ref_1 = require("./models/recaptcha-config-ref");
|
|
31
|
+
Object.defineProperty(exports, "RecaptchaConfigRef", { enumerable: true, get: function () { return recaptcha_config_ref_1.RecaptchaConfigRef; } });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RecaptchaRemoteIpProvider, RecaptchaResponseProvider, ScoreValidator } from
|
|
1
|
+
import { RecaptchaRemoteIpProvider, RecaptchaResponseProvider, ScoreValidator, SkipIfValue } from '../types';
|
|
2
2
|
export interface GoogleRecaptchaGuardOptions {
|
|
3
3
|
response: RecaptchaResponseProvider;
|
|
4
4
|
remoteIp?: RecaptchaRemoteIpProvider;
|
|
5
|
-
skipIf?:
|
|
5
|
+
skipIf?: SkipIfValue;
|
|
6
6
|
score?: ScoreValidator;
|
|
7
7
|
}
|
|
@@ -2,8 +2,7 @@ import { GoogleRecaptchaGuardOptions } from './google-recaptcha-guard-options';
|
|
|
2
2
|
import { GoogleRecaptchaValidatorOptions } from './google-recaptcha-validator-options';
|
|
3
3
|
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
|
4
4
|
import { Logger } from '@nestjs/common';
|
|
5
|
-
import {
|
|
6
|
-
import { OptionalFactoryDependency } from '@nestjs/common/interfaces/modules/optional-factory-dependency.interface';
|
|
5
|
+
import { Abstract } from '@nestjs/common/interfaces/abstract.interface';
|
|
7
6
|
export interface GoogleRecaptchaModuleOptions extends GoogleRecaptchaValidatorOptions, GoogleRecaptchaGuardOptions {
|
|
8
7
|
debug?: boolean;
|
|
9
8
|
logger?: Logger;
|
|
@@ -13,7 +12,7 @@ export interface GoogleRecaptchaOptionsFactory {
|
|
|
13
12
|
createGoogleRecaptchaOptions(): Promise<GoogleRecaptchaModuleOptions> | GoogleRecaptchaModuleOptions;
|
|
14
13
|
}
|
|
15
14
|
export interface GoogleRecaptchaModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
|
16
|
-
inject?: Array<
|
|
15
|
+
inject?: Array<string | symbol | Type | Abstract<any> | Function>;
|
|
17
16
|
useClass?: Type<GoogleRecaptchaOptionsFactory>;
|
|
18
17
|
useExisting?: Type<GoogleRecaptchaOptionsFactory>;
|
|
19
18
|
useFactory?: (...args: any[]) => Promise<Omit<GoogleRecaptchaModuleOptions, 'global'>> | Omit<GoogleRecaptchaModuleOptions, 'global'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RecaptchaRemoteIpProvider, RecaptchaResponseProvider, ScoreValidator } from
|
|
1
|
+
import { RecaptchaRemoteIpProvider, RecaptchaResponseProvider, ScoreValidator } from '../types';
|
|
2
2
|
export interface VerifyResponseDecoratorOptions {
|
|
3
3
|
response?: RecaptchaResponseProvider;
|
|
4
4
|
remoteIp?: RecaptchaRemoteIpProvider;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GoogleRecaptchaModuleOptions } from '../interfaces/google-recaptcha-module-options';
|
|
2
|
+
import { GoogleRecaptchaEnterpriseOptions } from '../interfaces/google-recaptcha-enterprise-options';
|
|
3
|
+
import { ScoreValidator, SkipIfValue } from '../types';
|
|
4
|
+
export declare class RecaptchaConfigRef {
|
|
5
|
+
private readonly value;
|
|
6
|
+
get valueOf(): GoogleRecaptchaModuleOptions;
|
|
7
|
+
constructor(value: GoogleRecaptchaModuleOptions);
|
|
8
|
+
setSecretKey(secretKey: string): this;
|
|
9
|
+
setEnterpriseOptions(options: GoogleRecaptchaEnterpriseOptions): this;
|
|
10
|
+
setScore(score: ScoreValidator): this;
|
|
11
|
+
setSkipIf(skipIf: SkipIfValue): this;
|
|
12
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RecaptchaConfigRef = void 0;
|
|
4
|
+
class RecaptchaConfigRef {
|
|
5
|
+
constructor(value) {
|
|
6
|
+
this.value = value;
|
|
7
|
+
}
|
|
8
|
+
get valueOf() {
|
|
9
|
+
return this.value;
|
|
10
|
+
}
|
|
11
|
+
setSecretKey(secretKey) {
|
|
12
|
+
this.value.secretKey = secretKey;
|
|
13
|
+
this.value.enterprise = undefined;
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
setEnterpriseOptions(options) {
|
|
17
|
+
this.value.secretKey = undefined;
|
|
18
|
+
this.value.enterprise = options;
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
setScore(score) {
|
|
22
|
+
this.value.score = score;
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
setSkipIf(skipIf) {
|
|
26
|
+
this.value.skipIf = skipIf;
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.RecaptchaConfigRef = RecaptchaConfigRef;
|
package/package.json
CHANGED
package/provider.declarations.js
CHANGED
|
@@ -5,4 +5,3 @@ exports.RECAPTCHA_OPTIONS = Symbol('RECAPTCHA_OPTIONS');
|
|
|
5
5
|
exports.RECAPTCHA_VALIDATION_OPTIONS = Symbol('RECAPTCHA_VALIDATION_OPTIONS');
|
|
6
6
|
exports.RECAPTCHA_AXIOS_INSTANCE = 'RECAPTCHA_AXIOS_INSTANCE';
|
|
7
7
|
exports.RECAPTCHA_LOGGER = 'RECAPTCHA_LOGGER';
|
|
8
|
-
//# sourceMappingURL=provider.declarations.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AbstractGoogleRecaptchaValidator } from './validators/abstract-google-recaptcha-validator';
|
|
2
|
-
import { GoogleRecaptchaModuleOptions } from '../interfaces/google-recaptcha-module-options';
|
|
3
2
|
import { GoogleRecaptchaValidator } from './validators/google-recaptcha.validator';
|
|
4
3
|
import { GoogleRecaptchaEnterpriseValidator } from './validators/google-recaptcha-enterprise.validator';
|
|
4
|
+
import { RecaptchaConfigRef } from '../models/recaptcha-config-ref';
|
|
5
5
|
export declare class RecaptchaValidatorResolver {
|
|
6
|
-
private readonly
|
|
6
|
+
private readonly configRef;
|
|
7
7
|
protected readonly googleRecaptchaValidator: GoogleRecaptchaValidator;
|
|
8
8
|
protected readonly googleRecaptchaEnterpriseValidator: GoogleRecaptchaEnterpriseValidator;
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(configRef: RecaptchaConfigRef, googleRecaptchaValidator: GoogleRecaptchaValidator, googleRecaptchaEnterpriseValidator: GoogleRecaptchaEnterpriseValidator);
|
|
10
10
|
resolve(): AbstractGoogleRecaptchaValidator<unknown>;
|
|
11
11
|
}
|
|
@@ -8,26 +8,24 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.RecaptchaValidatorResolver = void 0;
|
|
16
13
|
const common_1 = require("@nestjs/common");
|
|
17
|
-
const provider_declarations_1 = require("../provider.declarations");
|
|
18
14
|
const google_recaptcha_validator_1 = require("./validators/google-recaptcha.validator");
|
|
19
15
|
const google_recaptcha_enterprise_validator_1 = require("./validators/google-recaptcha-enterprise.validator");
|
|
16
|
+
const recaptcha_config_ref_1 = require("../models/recaptcha-config-ref");
|
|
20
17
|
let RecaptchaValidatorResolver = class RecaptchaValidatorResolver {
|
|
21
|
-
constructor(
|
|
22
|
-
this.
|
|
18
|
+
constructor(configRef, googleRecaptchaValidator, googleRecaptchaEnterpriseValidator) {
|
|
19
|
+
this.configRef = configRef;
|
|
23
20
|
this.googleRecaptchaValidator = googleRecaptchaValidator;
|
|
24
21
|
this.googleRecaptchaEnterpriseValidator = googleRecaptchaEnterpriseValidator;
|
|
25
22
|
}
|
|
26
23
|
resolve() {
|
|
27
|
-
|
|
24
|
+
const configValue = this.configRef.valueOf;
|
|
25
|
+
if (configValue.secretKey) {
|
|
28
26
|
return this.googleRecaptchaValidator;
|
|
29
27
|
}
|
|
30
|
-
if (Object.keys(
|
|
28
|
+
if (Object.keys(configValue.enterprise || {}).length) {
|
|
31
29
|
return this.googleRecaptchaEnterpriseValidator;
|
|
32
30
|
}
|
|
33
31
|
throw new Error('Cannot resolve google recaptcha validator');
|
|
@@ -35,9 +33,8 @@ let RecaptchaValidatorResolver = class RecaptchaValidatorResolver {
|
|
|
35
33
|
};
|
|
36
34
|
RecaptchaValidatorResolver = __decorate([
|
|
37
35
|
(0, common_1.Injectable)(),
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
__metadata("design:paramtypes", [recaptcha_config_ref_1.RecaptchaConfigRef,
|
|
37
|
+
google_recaptcha_validator_1.GoogleRecaptchaValidator,
|
|
40
38
|
google_recaptcha_enterprise_validator_1.GoogleRecaptchaEnterpriseValidator])
|
|
41
39
|
], RecaptchaValidatorResolver);
|
|
42
40
|
exports.RecaptchaValidatorResolver = RecaptchaValidatorResolver;
|
|
43
|
-
//# sourceMappingURL=recaptcha-validator.resolver.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { VerifyResponseOptions } from '../../interfaces/verify-response-decorator-options';
|
|
2
2
|
import { ScoreValidator } from '../../types';
|
|
3
|
-
import { GoogleRecaptchaModuleOptions } from '../../interfaces/google-recaptcha-module-options';
|
|
4
3
|
import { RecaptchaVerificationResult } from '../../models/recaptcha-verification-result';
|
|
4
|
+
import { RecaptchaConfigRef } from '../../models/recaptcha-config-ref';
|
|
5
5
|
export declare abstract class AbstractGoogleRecaptchaValidator<Res> {
|
|
6
|
-
protected readonly options:
|
|
7
|
-
protected constructor(options:
|
|
6
|
+
protected readonly options: RecaptchaConfigRef;
|
|
7
|
+
protected constructor(options: RecaptchaConfigRef);
|
|
8
8
|
abstract validate(options: VerifyResponseOptions): Promise<RecaptchaVerificationResult<Res>>;
|
|
9
9
|
protected isValidAction(action: string, options?: VerifyResponseOptions): boolean;
|
|
10
10
|
protected isValidScore(score: number, validator?: ScoreValidator): boolean;
|
|
@@ -9,10 +9,10 @@ class AbstractGoogleRecaptchaValidator {
|
|
|
9
9
|
if (options.action) {
|
|
10
10
|
return options.action === action;
|
|
11
11
|
}
|
|
12
|
-
return this.options.actions ? this.options.actions.includes(action) : true;
|
|
12
|
+
return this.options.valueOf.actions ? this.options.valueOf.actions.includes(action) : true;
|
|
13
13
|
}
|
|
14
14
|
isValidScore(score, validator) {
|
|
15
|
-
const finalValidator = validator || this.options.score;
|
|
15
|
+
const finalValidator = validator || this.options.valueOf.score;
|
|
16
16
|
if (finalValidator) {
|
|
17
17
|
if (typeof finalValidator === 'function') {
|
|
18
18
|
return finalValidator(score);
|
|
@@ -23,4 +23,3 @@ class AbstractGoogleRecaptchaValidator {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
exports.AbstractGoogleRecaptchaValidator = AbstractGoogleRecaptchaValidator;
|
|
26
|
-
//# sourceMappingURL=abstract-google-recaptcha-validator.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Logger } from '@nestjs/common';
|
|
2
|
-
import { GoogleRecaptchaModuleOptions } from '../../interfaces/google-recaptcha-module-options';
|
|
3
2
|
import { VerifyResponseOptions } from '../../interfaces/verify-response-decorator-options';
|
|
4
3
|
import { AbstractGoogleRecaptchaValidator } from './abstract-google-recaptcha-validator';
|
|
5
4
|
import { RecaptchaVerificationResult } from '../../models/recaptcha-verification-result';
|
|
6
5
|
import { VerifyResponseEnterprise } from '../../interfaces/verify-response-enterprise';
|
|
7
6
|
import { EnterpriseReasonTransformer } from '../enterprise-reason.transformer';
|
|
8
7
|
import { AxiosInstance } from 'axios';
|
|
8
|
+
import { RecaptchaConfigRef } from '../../models/recaptcha-config-ref';
|
|
9
9
|
export declare class GoogleRecaptchaEnterpriseValidator extends AbstractGoogleRecaptchaValidator<VerifyResponseEnterprise> {
|
|
10
10
|
private readonly axios;
|
|
11
11
|
private readonly logger;
|
|
12
12
|
private readonly enterpriseReasonTransformer;
|
|
13
13
|
private readonly headers;
|
|
14
|
-
constructor(axios: AxiosInstance, logger: Logger,
|
|
14
|
+
constructor(axios: AxiosInstance, logger: Logger, configRef: RecaptchaConfigRef, enterpriseReasonTransformer: EnterpriseReasonTransformer);
|
|
15
15
|
validate(options: VerifyResponseOptions): Promise<RecaptchaVerificationResult<VerifyResponseEnterprise>>;
|
|
16
16
|
private verifyResponse;
|
|
17
17
|
}
|
|
@@ -22,9 +22,10 @@ const google_recaptcha_network_exception_1 = require("../../exceptions/google-re
|
|
|
22
22
|
const google_recaptcha_context_1 = require("../../enums/google-recaptcha-context");
|
|
23
23
|
const enterprise_reason_transformer_1 = require("../enterprise-reason.transformer");
|
|
24
24
|
const get_error_info_1 = require("../../helpers/get-error-info");
|
|
25
|
+
const recaptcha_config_ref_1 = require("../../models/recaptcha-config-ref");
|
|
25
26
|
let GoogleRecaptchaEnterpriseValidator = class GoogleRecaptchaEnterpriseValidator extends abstract_google_recaptcha_validator_1.AbstractGoogleRecaptchaValidator {
|
|
26
|
-
constructor(axios, logger,
|
|
27
|
-
super(
|
|
27
|
+
constructor(axios, logger, configRef, enterpriseReasonTransformer) {
|
|
28
|
+
super(configRef);
|
|
28
29
|
this.axios = axios;
|
|
29
30
|
this.logger = logger;
|
|
30
31
|
this.enterpriseReasonTransformer = enterpriseReasonTransformer;
|
|
@@ -67,11 +68,11 @@ let GoogleRecaptchaEnterpriseValidator = class GoogleRecaptchaEnterpriseValidato
|
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
70
|
verifyResponse(response, expectedAction, remoteIp) {
|
|
70
|
-
const projectId = this.options.enterprise.projectId;
|
|
71
|
+
const projectId = this.options.valueOf.enterprise.projectId;
|
|
71
72
|
const body = {
|
|
72
73
|
event: {
|
|
73
74
|
expectedAction,
|
|
74
|
-
siteKey: this.options.enterprise.siteKey,
|
|
75
|
+
siteKey: this.options.valueOf.enterprise.siteKey,
|
|
75
76
|
token: response,
|
|
76
77
|
userIpAddress: remoteIp,
|
|
77
78
|
},
|
|
@@ -80,22 +81,22 @@ let GoogleRecaptchaEnterpriseValidator = class GoogleRecaptchaEnterpriseValidato
|
|
|
80
81
|
const config = {
|
|
81
82
|
headers: this.headers,
|
|
82
83
|
params: {
|
|
83
|
-
key: this.options.enterprise.apiKey,
|
|
84
|
+
key: this.options.valueOf.enterprise.apiKey,
|
|
84
85
|
},
|
|
85
86
|
};
|
|
86
|
-
if (this.options.debug) {
|
|
87
|
+
if (this.options.valueOf.debug) {
|
|
87
88
|
this.logger.debug({ body }, `${google_recaptcha_context_1.GoogleRecaptchaContext.GoogleRecaptchaEnterprise}.request`);
|
|
88
89
|
}
|
|
89
90
|
return this.axios.post(url, body, config)
|
|
90
91
|
.then((res) => res.data)
|
|
91
92
|
.then((data) => {
|
|
92
|
-
if (this.options.debug) {
|
|
93
|
+
if (this.options.valueOf.debug) {
|
|
93
94
|
this.logger.debug(data, `${google_recaptcha_context_1.GoogleRecaptchaContext.GoogleRecaptchaEnterprise}.response`);
|
|
94
95
|
}
|
|
95
96
|
return [data, null];
|
|
96
97
|
})
|
|
97
98
|
.catch((err) => {
|
|
98
|
-
if (this.options.debug) {
|
|
99
|
+
if (this.options.valueOf.debug) {
|
|
99
100
|
this.logger.debug((0, get_error_info_1.getErrorInfo)(err), `${google_recaptcha_context_1.GoogleRecaptchaContext.GoogleRecaptchaEnterprise}.error`);
|
|
100
101
|
}
|
|
101
102
|
const networkErrorCode = err.isAxiosError && err.code;
|
|
@@ -114,8 +115,8 @@ GoogleRecaptchaEnterpriseValidator = __decorate([
|
|
|
114
115
|
(0, common_1.Injectable)(),
|
|
115
116
|
__param(0, (0, common_1.Inject)(provider_declarations_1.RECAPTCHA_AXIOS_INSTANCE)),
|
|
116
117
|
__param(1, (0, common_1.Inject)(provider_declarations_1.RECAPTCHA_LOGGER)),
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
__metadata("design:paramtypes", [Function, common_1.Logger,
|
|
119
|
+
recaptcha_config_ref_1.RecaptchaConfigRef,
|
|
120
|
+
enterprise_reason_transformer_1.EnterpriseReasonTransformer])
|
|
119
121
|
], GoogleRecaptchaEnterpriseValidator);
|
|
120
122
|
exports.GoogleRecaptchaEnterpriseValidator = GoogleRecaptchaEnterpriseValidator;
|
|
121
|
-
//# sourceMappingURL=google-recaptcha-enterprise.validator.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Logger } from '@nestjs/common';
|
|
2
2
|
import { VerifyResponseOptions } from '../../interfaces/verify-response-decorator-options';
|
|
3
3
|
import { VerifyResponseV3 } from '../../interfaces/verify-response';
|
|
4
|
-
import { GoogleRecaptchaModuleOptions } from '../../interfaces/google-recaptcha-module-options';
|
|
5
4
|
import { AbstractGoogleRecaptchaValidator } from './abstract-google-recaptcha-validator';
|
|
6
5
|
import { RecaptchaVerificationResult } from '../../models/recaptcha-verification-result';
|
|
7
6
|
import { AxiosInstance } from 'axios';
|
|
7
|
+
import { RecaptchaConfigRef } from "../../models/recaptcha-config-ref";
|
|
8
8
|
export declare class GoogleRecaptchaValidator extends AbstractGoogleRecaptchaValidator<VerifyResponseV3> {
|
|
9
9
|
private readonly axios;
|
|
10
10
|
private readonly logger;
|
|
11
11
|
private readonly defaultNetwork;
|
|
12
12
|
private readonly headers;
|
|
13
|
-
constructor(axios: AxiosInstance, logger: Logger,
|
|
13
|
+
constructor(axios: AxiosInstance, logger: Logger, configRef: RecaptchaConfigRef);
|
|
14
14
|
/**
|
|
15
15
|
* @throws GoogleRecaptchaNetworkException
|
|
16
16
|
* @param {VerifyResponseOptions} options
|
|
@@ -23,9 +23,10 @@ const abstract_google_recaptcha_validator_1 = require("./abstract-google-recaptc
|
|
|
23
23
|
const recaptcha_verification_result_1 = require("../../models/recaptcha-verification-result");
|
|
24
24
|
const google_recaptcha_context_1 = require("../../enums/google-recaptcha-context");
|
|
25
25
|
const get_error_info_1 = require("../../helpers/get-error-info");
|
|
26
|
+
const recaptcha_config_ref_1 = require("../../models/recaptcha-config-ref");
|
|
26
27
|
let GoogleRecaptchaValidator = class GoogleRecaptchaValidator extends abstract_google_recaptcha_validator_1.AbstractGoogleRecaptchaValidator {
|
|
27
|
-
constructor(axios, logger,
|
|
28
|
-
super(
|
|
28
|
+
constructor(axios, logger, configRef) {
|
|
29
|
+
super(configRef);
|
|
29
30
|
this.axios = axios;
|
|
30
31
|
this.logger = logger;
|
|
31
32
|
this.defaultNetwork = google_recaptcha_network_1.GoogleRecaptchaNetwork.Google;
|
|
@@ -69,18 +70,18 @@ let GoogleRecaptchaValidator = class GoogleRecaptchaValidator extends abstract_g
|
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
72
|
verifyResponse(response, remoteIp) {
|
|
72
|
-
const body = qs.stringify({ secret: this.options.secretKey, response, remoteip: remoteIp });
|
|
73
|
-
const url = this.options.network || this.defaultNetwork;
|
|
73
|
+
const body = qs.stringify({ secret: this.options.valueOf.secretKey, response, remoteip: remoteIp });
|
|
74
|
+
const url = this.options.valueOf.network || this.defaultNetwork;
|
|
74
75
|
const config = {
|
|
75
76
|
headers: this.headers,
|
|
76
77
|
};
|
|
77
|
-
if (this.options.debug) {
|
|
78
|
+
if (this.options.valueOf.debug) {
|
|
78
79
|
this.logger.debug({ body }, `${google_recaptcha_context_1.GoogleRecaptchaContext.GoogleRecaptcha}.request`);
|
|
79
80
|
}
|
|
80
81
|
return this.axios.post(url, body, config)
|
|
81
82
|
.then((res) => res.data)
|
|
82
83
|
.then((data) => {
|
|
83
|
-
if (this.options.debug) {
|
|
84
|
+
if (this.options.valueOf.debug) {
|
|
84
85
|
this.logger.debug(data, `${google_recaptcha_context_1.GoogleRecaptchaContext.GoogleRecaptcha}.response`);
|
|
85
86
|
}
|
|
86
87
|
return data;
|
|
@@ -91,7 +92,7 @@ let GoogleRecaptchaValidator = class GoogleRecaptchaValidator extends abstract_g
|
|
|
91
92
|
return result;
|
|
92
93
|
})
|
|
93
94
|
.catch((err) => {
|
|
94
|
-
if (this.options.debug) {
|
|
95
|
+
if (this.options.valueOf.debug) {
|
|
95
96
|
this.logger.debug((0, get_error_info_1.getErrorInfo)(err), `${google_recaptcha_context_1.GoogleRecaptchaContext.GoogleRecaptcha}.error`);
|
|
96
97
|
}
|
|
97
98
|
const networkErrorCode = err.isAxiosError && err.code;
|
|
@@ -112,8 +113,7 @@ GoogleRecaptchaValidator = __decorate([
|
|
|
112
113
|
(0, common_1.Injectable)(),
|
|
113
114
|
__param(0, (0, common_1.Inject)(provider_declarations_1.RECAPTCHA_AXIOS_INSTANCE)),
|
|
114
115
|
__param(1, (0, common_1.Inject)(provider_declarations_1.RECAPTCHA_LOGGER)),
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
__metadata("design:paramtypes", [Function, common_1.Logger,
|
|
117
|
+
recaptcha_config_ref_1.RecaptchaConfigRef])
|
|
117
118
|
], GoogleRecaptchaValidator);
|
|
118
119
|
exports.GoogleRecaptchaValidator = GoogleRecaptchaValidator;
|
|
119
|
-
//# sourceMappingURL=google-recaptcha.validator.js.map
|
package/types.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ import { ContextType } from '@nestjs/common';
|
|
|
2
2
|
export declare type RecaptchaResponseProvider = (req: any) => string | Promise<string>;
|
|
3
3
|
export declare type RecaptchaRemoteIpProvider = (req: any) => string | Promise<string>;
|
|
4
4
|
export declare type ScoreValidator = number | ((score: number) => boolean);
|
|
5
|
+
export declare type SkipIfValue = boolean | (<Req = unknown>(request: Req) => boolean | Promise<boolean>);
|
|
5
6
|
export declare type RecaptchaContextType = ContextType | 'graphql';
|
package/types.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recaptcha-result.js","sourceRoot":"","sources":["../../src/decorators/recaptcha-result.ts"],"names":[],"mappings":";;;AAAA,2CAAwE;AACxE,wDAAoD;AAEvC,QAAA,eAAe,GAAG,IAAA,6BAAoB,EAAC,CAAC,IAAI,EAAE,OAAyB,EAAE,EAAE;;IACvF,QAAQ,OAAO,CAAC,OAAO,EAAsB,EAAE;QAC9C,KAAK,MAAM;YACV,OAAO,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC,yBAAyB,CAAC;QACtE,KAAK,SAAS;YACb,OAAO,MAAA,MAAA,MAAA,MAAA,IAAA,wBAAU,EAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC,GAAG,0CAAE,UAAU,0CAAE,YAAY,0CAAE,GAAG,0CAC3H,yBAAyB,CAAC;KAC9B;AACF,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recaptcha.js","sourceRoot":"","sources":["../../src/decorators/recaptcha.ts"],"names":[],"mappings":";;;AAAA,2CAA4D;AAC5D,6EAAwE;AAExE,mEAA8D;AAE9D,SAAgB,SAAS,CAAC,OAAwC;IACjE,OAAO,IAAA,wBAAe,EAAC,IAAA,2CAAmB,EAAC,OAAO,CAAC,EAAE,IAAA,kBAAS,EAAC,6CAAoB,CAAC,CAAC,CAAC;AACvF,CAAC;AAFD,8BAEC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-recaptcha-options.js","sourceRoot":"","sources":["../../src/decorators/set-recaptcha-options.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAE7C,oEAAwE;AAExE,SAAgB,mBAAmB,CAAC,OAAwC;IAC3E,OAAO,IAAA,oBAAW,EAAC,oDAA4B,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC;AAFD,kDAEC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classification-reason.js","sourceRoot":"","sources":["../../src/enums/classification-reason.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC/B,+FAAuE,CAAA;IACvE,iDAAyB,CAAA;IACzB,yEAAiD,CAAA;IACjD,6DAAqC,CAAA;IACrC,+EAAuD,CAAA;IACvD,qEAA6C,CAAA;AAC9C,CAAC,EAPW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAO/B"}
|
package/enums/error-code.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error-code.js","sourceRoot":"","sources":["../../src/enums/error-code.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAgBX;AAhBD,WAAY,SAAS;IACpB,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,4DAA+C,CAAA;IAC/C,4DAA+C,CAAA;IAC/C,uCAA0B,CAAA;IAC1B,wDAA2C,CAAA;IAC3C,2CAA8B,CAAA;IAC9B,iDAAoC,CAAA;IACpC,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,0DAA6C,CAAA;IAC7C,2CAA8B,CAAA;IAC9B,aAAa;IACb,2CAA8B,CAAA;IAC9B,2CAA8B,CAAA;AAC/B,CAAC,EAhBW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAgBpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-context.js","sourceRoot":"","sources":["../../src/enums/google-recaptcha-context.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IACjC,6DAAmC,CAAA;IACnC,iFAAuD,CAAA;AACxD,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-enterprise-reason.js","sourceRoot":"","sources":["../../src/enums/google-recaptcha-enterprise-reason.ts"],"names":[],"mappings":";;;AAAA,IAAY,+BASX;AATD,WAAY,+BAA+B;IAC1C,0FAAuD,CAAA;IACvD,kFAA+C,CAAA;IAC/C,0DAAuB,CAAA;IACvB,sDAAmB,CAAA;IACnB,gDAAa,CAAA;IACb,iEAA8B,CAAA;IAC9B,sDAAmB,CAAA;IACnB,iEAA8B,CAAA;AAC/B,CAAC,EATW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAS1C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-network.js","sourceRoot":"","sources":["../../src/enums/google-recaptcha-network.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IACjC,oFAA0D,CAAA;IAC1D,sFAA4D,CAAA;AAC7D,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-network.exception.js","sourceRoot":"","sources":["../../src/exceptions/google-recaptcha-network.exception.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AACxE,oDAAgD;AAEhD,MAAa,+BAAgC,SAAQ,qDAAwB;IAC5E,YAA4B,gBAAyB;QACpD,KAAK,CAAC,CAAC,sBAAS,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,gBAAgB,IAAI,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC;QAD3F,qBAAgB,GAAhB,gBAAgB,CAAS;IAErD,CAAC;CACD;AAJD,0EAIC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha.exception.js","sourceRoot":"","sources":["../../src/exceptions/google-recaptcha.exception.ts"],"names":[],"mappings":";;;AAAA,2CAA2D;AAC3D,oDAAgD;AAEhD,MAAa,wBAAyB,SAAQ,sBAAa;IAC1D,YAA4B,UAAuB,EAAE,YAAqB;QACzE,KAAK,CACJ,YAAY,IAAI,wBAAwB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EACvE,wBAAwB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACtD,CAAC;QAJyB,eAAU,GAAV,UAAU,CAAa;IAKnD,CAAC;IAEO,MAAM,CAAC,eAAe,CAAC,SAAoB;QAClD,QAAQ,SAAS,EAAE;YAClB,KAAK,sBAAS,CAAC,oBAAoB;gBAClC,OAAO,iDAAiD,CAAC;YAE1D,KAAK,sBAAS,CAAC,oBAAoB;gBAClC,OAAO,oCAAoC,CAAC;YAC7C,KAAK,sBAAS,CAAC,kBAAkB;gBAChC,OAAO,iFAAiF,CAAC;YAE1F,KAAK,sBAAS,CAAC,kBAAkB,CAAC;YAClC,KAAK,sBAAS,CAAC,kBAAkB;gBAChC,OAAO,gEAAgE,CAAC;YAEzE,KAAK,sBAAS,CAAC,WAAW;gBACzB,OAAO,gDAAgD,CA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{"version":3,"file":"load-module.js","sourceRoot":"","sources":["../../src/helpers/load-module.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAGxC,SAAgB,UAAU,CAAC,UAAkB,EAAE,QAAQ,GAAG,KAAK;IAC9D,IAAI;QACH,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;KAC3B;IAAC,OAAO,CAAC,EAAE;QACX,IAAI,QAAQ,EAAE;YACb,eAAM,CAAC,KAAK,CAAC,WAAW,UAAU,4CAA4C,UAAU,EAAE,CAAC,CAAC;SAC5F;QACD,MAAM,CAAC,CAAC;KACR;AACF,CAAC;AATD,gCASC"}
|
package/helpers/xor.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"xor.js","sourceRoot":"","sources":["../../src/helpers/xor.ts"],"names":[],"mappings":";;;AAAA,SAAgB,GAAG,CAAC,CAAU,EAAE,CAAU;IACzC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAFD,kBAEC"}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAAmD;AAA1C,sGAAA,SAAS,OAAA;AAClB,4EAAyE;AAAhE,4HAAA,mBAAmB,OAAA;AAC5B,kEAAgE;AAAvD,mHAAA,eAAe,OAAA;AACxB,0EAAuE;AAA9D,8HAAA,oBAAoB,OAAA;AAC7B,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAE9B,iDAA+C;AAAtC,uGAAA,SAAS,OAAA;AAClB,6EAA0E;AAAjE,kIAAA,sBAAsB,OAAA;AAC/B,sFAAmF;AAA1E,sIAAA,wBAAwB,OAAA;AACjC,sGAAkG;AAAzF,qJAAA,+BAA+B,OAAA;AACxC,+FAA4F;AAAnF,sIAAA,wBAAwB,OAAA;AACjC,qHAAiH;AAAxG,2JAAA,kCAAkC,OAAA;AAC3C,wFAAqF;AAA5E,4IAAA,2BAA2B,OAAA;AACpC,uEAAqE;AAA5D,6HAAA,oBAAoB,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-enterprise-options.js","sourceRoot":"","sources":["../../src/interfaces/google-recaptcha-enterprise-options.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-guard-options.js","sourceRoot":"","sources":["../../src/interfaces/google-recaptcha-guard-options.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-module-options.js","sourceRoot":"","sources":["../../src/interfaces/google-recaptcha-module-options.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-validator-options.js","sourceRoot":"","sources":["../../src/interfaces/google-recaptcha-validator-options.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"literal-object.js","sourceRoot":"","sources":["../../src/interfaces/literal-object.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verify-response-decorator-options.js","sourceRoot":"","sources":["../../src/interfaces/verify-response-decorator-options.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verify-response-enterprise.js","sourceRoot":"","sources":["../../src/interfaces/verify-response-enterprise.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"verify-response.js","sourceRoot":"","sources":["../../src/interfaces/verify-response.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recaptcha-verification-result.js","sourceRoot":"","sources":["../../src/models/recaptcha-verification-result.ts"],"names":[],"mappings":";;;AAcA,MAAa,2BAA2B;IAevC,YAA6B,OAAgD;QAAh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BAAgB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enterprise-reason.transformer.js","sourceRoot":"","sources":["../../src/services/enterprise-reason.transformer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAC5C,oGAA8F;AAC9F,oDAAgD;AAGzC,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IACvC,SAAS,CAAC,OAAwC;QACjD,QAAQ,OAAO,EAAE;YAChB,KAAK,oEAA+B,CAAC,YAAY;gBAChD,OAAO,sBAAS,CAAC,YAAY,CAAC;YAE/B,KAAK,oEAA+B,CAAC,YAAY;gBAChD,OAAO,sBAAS,CAAC,YAAY,CAAC;YAE/B,KAAK,oEAA+B,CAAC,OAAO,CAAC;YAC7C,KAAK,oEAA+B,CAAC,IAAI;gBACxC,OAAO,sBAAS,CAAC,kBAAkB,CAAC;YAErC,KAAK,oEAA+B,CAAC,oBAAoB,CAAC;YAC1D,KAAK,oEAA+B,CAAC,SAAS;gBAC7C,OAAO,sBAAS,CAAC,oBAAoB,CAAC;YAEvC,KAAK,oEAA+B,CAAC,OAAO;gBAC3C,OAAO,sBAAS,CAAC,oBAAoB,CAAC;YAEvC,KAAK,oEAA+B,CAAC,wBAAwB;gBAC5D,OAAO,IAAI,CAAC;YAEb;gBACC,OAAO,sBAAS,CAAC,YAAY,CAAC;SAC/B;IACF,CAAC;CACD,CAAA;AA3BY,2BAA2B;IADvC,IAAA,mBAAU,GAAE;GACA,2BAA2B,CA2BvC;AA3BY,kEAA2B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recaptcha-request.resolver.js","sourceRoot":"","sources":["../../src/services/recaptcha-request.resolver.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA8D;AAC9D,wDAAoD;AAI7C,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACpC,OAAO,CAAI,OAAyB;;QACnC,MAAM,WAAW,GAAyB,OAAO,CAAC,OAAO,EAAE,CAAC;QAE5D,QAAQ,WAAW,EAAE;YACpB,KAAK,MAAM;gBACV,OAAO,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;YAE5C,KAAK,SAAS;gBACb,OAAO,MAAA,MAAA,MAAA,IAAA,wBAAU,EAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC,GAAG,0CAAE,MAAM,0CAAE,YAAY,0CAAE,GAAG,CAAC;YAC5H;gBACC,MAAM,IAAI,KAAK,CAAC,6BAA6B,WAAW,IAAI,CAAC,CAAC;SAC/D;IACF,CAAC;CACD,CAAA;AAdY,wBAAwB;IADpC,IAAA,mBAAU,GAAE;GACA,wBAAwB,CAcpC;AAdY,4DAAwB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recaptcha-validator.resolver.js","sourceRoot":"","sources":["../../src/services/recaptcha-validator.resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AAEpD,oEAA6D;AAE7D,wFAAmF;AACnF,8GAAwG;AAGjG,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IACtC,YAC6C,OAAqC,EAC9D,wBAAkD,EAClD,kCAAsE;QAF7C,YAAO,GAAP,OAAO,CAA8B;QAC9D,6BAAwB,GAAxB,wBAAwB,CAA0B;QAClD,uCAAkC,GAAlC,kCAAkC,CAAoC;IACvF,CAAC;IAEJ,OAAO;QACN,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;YAC3B,OAAO,IAAI,CAAC,wBAAwB,CAAC;SACrC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;YACtD,OAAO,IAAI,CAAC,kCAAkC,CAAC;SAC/C;QAED,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC9D,CAAC;CACD,CAAA;AAlBY,0BAA0B;IADtC,IAAA,mBAAU,GAAE;IAGV,WAAA,IAAA,eAAM,EAAC,yCAAiB,CAAC,CAAA;6CACmB,qDAAwB;QACd,0EAAkC;GAJ9E,0BAA0B,CAkBtC;AAlBY,gEAA0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-google-recaptcha-validator.js","sourceRoot":"","sources":["../../../src/services/validators/abstract-google-recaptcha-validator.ts"],"names":[],"mappings":";;;AAKA,MAAsB,gCAAgC;IACrD,YAAyC,OAAqC;QAArC,YAAO,GAAP,OAAO,CAA8B;IAAG,CAAC;IAIxE,aAAa,CAAC,MAAc,EAAE,OAA+B;QACtE,IAAI,OAAO,CAAC,MAAM,EAAE;YACnB,OAAO,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC;SACjC;QAED,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5E,CAAC;IAES,YAAY,CAAC,KAAa,EAAE,SAA0B;QAC/D,MAAM,cAAc,GAAG,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;QAEvD,IAAI,cAAc,EAAE;YACnB,IAAI,OAAO,cAAc,KAAK,UAAU,EAAE;gBACzC,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC;aAC7B;YAED,OAAO,KAAK,IAAI,cAAc,CAAC;SAC/B;QAED,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AA1BD,4EA0BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha-enterprise.validator.js","sourceRoot":"","sources":["../../../src/services/validators/google-recaptcha-enterprise.validator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4D;AAC5D,uEAA4G;AAG5G,+FAAyF;AACzF,8FAA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AAE,GAAG,CAAC,QAAQ,CAAC,MAAM;gBAC3B,IAAI,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI;aACvB,CAAC;YAEF,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;CACD,CAAA;AA3GY,kCAAkC;IAD9C,IAAA,mBAAU,GAAE;IAKV,WAAA,IAAA,eAAM,EAAC,gDAAwB,CAAC,CAAA;IAChC,WAAA,IAAA,eAAM,EAAC,wCAAgB,CAAC,CAAA;IACxB,WAAA,IAAA,eAAM,EAAC,yCAAiB,CAAC,CAAA;+CADyB,eAAM,UAEX,2DAA2B;GAP9D,kCAAkC,CA2G9C;AA3GY,gFAAkC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"google-recaptcha.validator.js","sourceRoot":"","sources":["../../../src/services/validators/google-recaptcha.validator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4D;AAC5D,uEAA4G;AAC5G,kCAAkC;AAElC,mFAA8E;AAG9E,uDAAmD;AACnD,4GAAsG;AAEtG,+FAAyF;AACzF,8FAAyF;AACzF,mFAA8E;AAC9E,iEAA4D;AAIrD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,sEAAkD;IAK/F,YACoD,KAAoB,EAC5B,MAAc,EAC9B,OAAqC;QAEhE,KAAK,CAAC,OAAO,CAAC,CAAC;QAJoC,UAAK,GAAL,KAAK,CAAe;QAC5B,WAAM,GAAN,MAAM,CAAQ;QANzC,mBAAc,GAAG,iDAAsB,CAAC,MAAM,CAAC;QAE/C,YAAO,GAAG,EAAE,cAAc,EAAE,mCAAmC,EAAE,CAAC;IAQnF,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAQ,CAAC,OAA8B;QAC5C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAmB,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CA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