@prosopo/provider 5.6.3 → 5.7.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/.turbo/turbo-build$colon$cjs.log +22 -21
- package/.turbo/turbo-build$colon$tsc.log +28 -25
- package/.turbo/turbo-build.log +22 -21
- package/CHANGELOG.md +204 -0
- package/dist/api/blacklistRequestInspector.d.ts +1 -1
- package/dist/api/blacklistRequestInspector.d.ts.map +1 -1
- package/dist/api/blacklistRequestInspector.js +9 -12
- package/dist/api/blacklistRequestInspector.js.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.d.ts.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.js +4 -4
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.js.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.d.ts +0 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.d.ts.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js +1 -9
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/constants.js.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.d.ts.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js +11 -65
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.js.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.d.ts.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js +1 -0
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/handler.js.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.d.ts.map +1 -1
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.js +2 -2
- package/dist/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.js.map +1 -1
- package/dist/api/captcha/getImageCaptchaChallenge.d.ts.map +1 -1
- package/dist/api/captcha/getImageCaptchaChallenge.js +2 -3
- package/dist/api/captcha/getImageCaptchaChallenge.js.map +1 -1
- package/dist/api/captcha/submitPoWCaptchaSolution.d.ts.map +1 -1
- package/dist/api/captcha/submitPoWCaptchaSolution.js +2 -1
- package/dist/api/captcha/submitPoWCaptchaSolution.js.map +1 -1
- package/dist/api/captcha/trafficFilterRequestTime.d.ts.map +1 -1
- package/dist/api/captcha/trafficFilterRequestTime.js +2 -2
- package/dist/api/captcha/trafficFilterRequestTime.js.map +1 -1
- package/dist/api/verify.d.ts.map +1 -1
- package/dist/api/verify.js +1 -1
- package/dist/api/verify.js.map +1 -1
- package/dist/cjs/api/blacklistRequestInspector.cjs +8 -11
- package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/accessPolicy.cjs +3 -3
- package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/constants.cjs +0 -9
- package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.cjs +9 -63
- package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/handler.cjs +1 -0
- package/dist/cjs/api/captcha/getFrictionlessCaptchaChallenge/shortCircuit.cjs +1 -1
- package/dist/cjs/api/captcha/getImageCaptchaChallenge.cjs +1 -1
- package/dist/cjs/api/captcha/submitPoWCaptchaSolution.cjs +3 -2
- package/dist/cjs/api/captcha/trafficFilterRequestTime.cjs +1 -1
- package/dist/cjs/api/verify.cjs +1 -1
- package/dist/cjs/tasks/frictionless/frictionlessTasks.cjs +5 -7
- package/dist/cjs/tasks/frictionless/frictionlessTasksUtils.cjs +30 -1
- package/dist/cjs/tasks/imgCaptcha/imgCaptchaTasks.cjs +1 -2
- package/dist/cjs/tasks/puzzle/puzzleDifficulty.cjs +13 -170
- package/dist/cjs/tasks/puzzle/puzzleRenderer.cjs +2 -2
- package/dist/cjs/tasks/spam/checkTrafficFilter.cjs +2 -8
- package/dist/tasks/frictionless/frictionlessTasks.d.ts +1 -2
- package/dist/tasks/frictionless/frictionlessTasks.d.ts.map +1 -1
- package/dist/tasks/frictionless/frictionlessTasks.js +5 -7
- package/dist/tasks/frictionless/frictionlessTasks.js.map +1 -1
- package/dist/tasks/frictionless/frictionlessTasksUtils.d.ts.map +1 -1
- package/dist/tasks/frictionless/frictionlessTasksUtils.js +30 -1
- package/dist/tasks/frictionless/frictionlessTasksUtils.js.map +1 -1
- package/dist/tasks/frictionless/routingMachine.d.ts +1 -0
- package/dist/tasks/frictionless/routingMachine.d.ts.map +1 -1
- package/dist/tasks/frictionless/routingMachine.js.map +1 -1
- package/dist/tasks/imgCaptcha/imgCaptchaTasks.d.ts +1 -1
- package/dist/tasks/imgCaptcha/imgCaptchaTasks.d.ts.map +1 -1
- package/dist/tasks/imgCaptcha/imgCaptchaTasks.js +1 -3
- package/dist/tasks/imgCaptcha/imgCaptchaTasks.js.map +1 -1
- package/dist/tasks/puzzle/puzzleDifficulty.d.ts +0 -17
- package/dist/tasks/puzzle/puzzleDifficulty.d.ts.map +1 -1
- package/dist/tasks/puzzle/puzzleDifficulty.js +11 -164
- package/dist/tasks/puzzle/puzzleDifficulty.js.map +1 -1
- package/dist/tasks/puzzle/puzzleRenderer.d.ts.map +1 -1
- package/dist/tasks/puzzle/puzzleRenderer.js +1 -1
- package/dist/tasks/puzzle/puzzleRenderer.js.map +1 -1
- package/dist/tasks/spam/checkTrafficFilter.d.ts +1 -1
- package/dist/tasks/spam/checkTrafficFilter.d.ts.map +1 -1
- package/dist/tasks/spam/checkTrafficFilter.js +3 -9
- package/dist/tasks/spam/checkTrafficFilter.js.map +1 -1
- package/dist/tests/integration/api/admin/apiRegisterSiteKeyEndpoint.integration.test.js +3 -19
- package/dist/tests/integration/api/admin/apiRegisterSiteKeyEndpoint.integration.test.js.map +1 -1
- package/dist/tests/integration/api/admin/apiRegisterSiteKeysEndpoint.integration.test.js +1 -10
- package/dist/tests/integration/api/admin/apiRegisterSiteKeysEndpoint.integration.test.js.map +1 -1
- package/dist/tests/integration/clientSettingsPersistence.integration.test.js +3 -15
- package/dist/tests/integration/clientSettingsPersistence.integration.test.js.map +1 -1
- package/dist/tests/unit/api/admin/apiRegisterSiteKeyEndpoint.unit.test.js +1 -0
- package/dist/tests/unit/api/admin/apiRegisterSiteKeyEndpoint.unit.test.js.map +1 -1
- package/dist/tests/unit/api/blacklistRequestInspector.unit.test.js +35 -0
- package/dist/tests/unit/api/blacklistRequestInspector.unit.test.js.map +1 -1
- package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/constants.unit.test.js +1 -30
- package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/constants.unit.test.js.map +1 -1
- package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.unit.test.js +0 -6
- package/dist/tests/unit/api/captcha/getFrictionlessCaptchaChallenge/decisionMachine.unit.test.js.map +1 -1
- package/dist/tests/unit/api/getFrictionlessCaptchaChallenge.unit.test.js +11 -122
- package/dist/tests/unit/api/getFrictionlessCaptchaChallenge.unit.test.js.map +1 -1
- package/dist/tests/unit/tasks/captchaManager.unit.test.js +2 -10
- package/dist/tests/unit/tasks/captchaManager.unit.test.js.map +1 -1
- package/dist/tests/unit/tasks/client/clientTasks.unit.test.js +3 -23
- package/dist/tests/unit/tasks/client/clientTasks.unit.test.js.map +1 -1
- package/dist/tests/unit/tasks/frictionless/frictionlessTasksUtils.unit.test.js +64 -0
- package/dist/tests/unit/tasks/frictionless/frictionlessTasksUtils.unit.test.js.map +1 -1
- package/dist/tests/unit/tasks/frictionless/routerImageRoundsClamp.unit.test.js +22 -3
- package/dist/tests/unit/tasks/frictionless/routerImageRoundsClamp.unit.test.js.map +1 -1
- package/dist/tests/unit/tasks/imgCaptcha/imgCaptchaTasks.unit.test.js +10 -10
- package/dist/tests/unit/tasks/imgCaptcha/imgCaptchaTasks.unit.test.js.map +1 -1
- package/dist/tests/unit/tasks/puzzleDifficulty.unit.test.js +2 -53
- package/dist/tests/unit/tasks/puzzleDifficulty.unit.test.js.map +1 -1
- package/package.json +29 -28
- package/dist/api/captcha/contextAwareValidation.d.ts +0 -4
- package/dist/api/captcha/contextAwareValidation.d.ts.map +0 -1
- package/dist/api/captcha/contextAwareValidation.js +0 -26
- package/dist/api/captcha/contextAwareValidation.js.map +0 -1
- package/dist/cjs/api/captcha/contextAwareValidation.cjs +0 -27
- package/dist/tests/unit/api/contextAwareValidation.unit.test.d.ts +0 -2
- package/dist/tests/unit/api/contextAwareValidation.unit.test.d.ts.map +0 -1
- package/dist/tests/unit/api/contextAwareValidation.unit.test.js +0 -84
- package/dist/tests/unit/api/contextAwareValidation.unit.test.js.map +0 -1
|
@@ -1,34 +1,12 @@
|
|
|
1
|
+
import { MIN_DECOY_HOLE_DARKEN_MARGIN, PUZZLE_DIFFICULTY_LEVELS, } from "@prosopo/captcha-severity";
|
|
1
2
|
import { DEFAULT_RENDER_SETTINGS, } from "@prosopo/puzzle-assets";
|
|
2
3
|
import { puzzleDecoyCountFieldSchema, puzzleDecoyEdgeDarknessFieldSchema, puzzleDecoyHoleDarkenFieldSchema, puzzlePieceScaleFieldSchema, puzzleToleranceFieldSchema, } from "@prosopo/types";
|
|
3
4
|
import { describe, expect, it } from "vitest";
|
|
4
|
-
import {
|
|
5
|
+
import { samplePuzzleDifficulty } from "../../../tasks/puzzle/puzzleDifficulty.js";
|
|
5
6
|
import { resolvePuzzleRenderSettings } from "../../../tasks/puzzle/puzzleRenderer.js";
|
|
6
7
|
const HOLE_DARKEN = DEFAULT_RENDER_SETTINGS.holeDarken;
|
|
7
8
|
const SAMPLES = 400;
|
|
8
9
|
describe("PUZZLE_DIFFICULTY_LEVELS table", () => {
|
|
9
|
-
it("is ordered strictly harder as the level rises", () => {
|
|
10
|
-
for (let i = 1; i < PUZZLE_DIFFICULTY_LEVELS.length; i++) {
|
|
11
|
-
const prev = PUZZLE_DIFFICULTY_LEVELS[i - 1];
|
|
12
|
-
const cur = PUZZLE_DIFFICULTY_LEVELS[i];
|
|
13
|
-
if (!prev || !cur)
|
|
14
|
-
throw new Error("missing level");
|
|
15
|
-
expect(cur.tolerance.max).toBeLessThan(prev.tolerance.max);
|
|
16
|
-
expect(cur.decoyCount.min).toBeGreaterThanOrEqual(prev.decoyCount.min);
|
|
17
|
-
expect(cur.decoyHoleDarken.max).toBeLessThan(prev.decoyHoleDarken.max);
|
|
18
|
-
expect(cur.decoyEdgeDarkness.max).toBeGreaterThan(prev.decoyEdgeDarkness.max);
|
|
19
|
-
expect(cur.pieceScale.max).toBeLessThan(prev.pieceScale.max);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
it("overlaps adjacent bands so one render does not identify the level", () => {
|
|
23
|
-
for (let i = 1; i < PUZZLE_DIFFICULTY_LEVELS.length; i++) {
|
|
24
|
-
const prev = PUZZLE_DIFFICULTY_LEVELS[i - 1];
|
|
25
|
-
const cur = PUZZLE_DIFFICULTY_LEVELS[i];
|
|
26
|
-
if (!prev || !cur)
|
|
27
|
-
throw new Error("missing level");
|
|
28
|
-
expect(cur.decoyCount.min).toBeLessThanOrEqual(prev.decoyCount.max);
|
|
29
|
-
expect(cur.tolerance.max).toBeGreaterThanOrEqual(prev.tolerance.min);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
10
|
it("keeps every band inside the settings-schema bounds", () => {
|
|
33
11
|
for (const band of PUZZLE_DIFFICULTY_LEVELS) {
|
|
34
12
|
for (const v of [band.tolerance.min, band.tolerance.max]) {
|
|
@@ -52,35 +30,6 @@ describe("PUZZLE_DIFFICULTY_LEVELS table", () => {
|
|
|
52
30
|
}
|
|
53
31
|
});
|
|
54
32
|
});
|
|
55
|
-
describe("severityToPuzzleDifficulty", () => {
|
|
56
|
-
it("maps no requested rounds to the baseline level", () => {
|
|
57
|
-
expect(severityToPuzzleDifficulty(undefined, 2)).toBe(0);
|
|
58
|
-
});
|
|
59
|
-
it("maps a request at or below the site baseline to the baseline level", () => {
|
|
60
|
-
expect(severityToPuzzleDifficulty(2, 2)).toBe(0);
|
|
61
|
-
expect(severityToPuzzleDifficulty(1, 2)).toBe(0);
|
|
62
|
-
});
|
|
63
|
-
it("rises monotonically with rounds requested above the baseline", () => {
|
|
64
|
-
const levels = [0, 1, 2, 3, 4, 5, 6, 7, 8, 12].map((extra) => severityToPuzzleDifficulty(2 + extra, 2, PUZZLE_DIFFICULTY_LEVELS.length));
|
|
65
|
-
for (let i = 1; i < levels.length; i++) {
|
|
66
|
-
expect(levels[i]).toBeGreaterThanOrEqual(levels[i - 1]);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
it("is relative to the site baseline, not an absolute round count", () => {
|
|
70
|
-
expect(severityToPuzzleDifficulty(6, 2)).toBeGreaterThan(severityToPuzzleDifficulty(6, 6));
|
|
71
|
-
});
|
|
72
|
-
it("caps automatic escalation below the hardest level", () => {
|
|
73
|
-
expect(severityToPuzzleDifficulty(100, 2)).toBe(MAX_AUTO_ESCALATION_LEVEL);
|
|
74
|
-
expect(MAX_AUTO_ESCALATION_LEVEL).toBeLessThan(PUZZLE_DIFFICULTY_LEVELS.length - 1);
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
describe("clampDifficultyLevel", () => {
|
|
78
|
-
it("clamps out-of-range and non-finite input", () => {
|
|
79
|
-
expect(clampDifficultyLevel(-5)).toBe(0);
|
|
80
|
-
expect(clampDifficultyLevel(Number.NaN)).toBe(0);
|
|
81
|
-
expect(clampDifficultyLevel(99)).toBe(MAX_AUTO_ESCALATION_LEVEL);
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
33
|
describe("samplePuzzleDifficulty", () => {
|
|
85
34
|
it("stays within its band across many draws", () => {
|
|
86
35
|
for (let level = 0; level < PUZZLE_DIFFICULTY_LEVELS.length; level++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puzzleDifficulty.unit.test.js","sourceRoot":"","sources":["../../../../src/tests/unit/tasks/puzzleDifficulty.unit.test.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,uBAAuB,GAEvB,MA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CACtD,QAAQ,CAAC,UAAU,GAAG,4BAA4B,CAClD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACxC,MAAM,QAAQ,GAAG,2BAA2B,CAAC;YAC5C,UAAU,EAAE,GAAG;YACf,eAAe,EAAE,GAAG;SACpB,CAAC,CAAC;QACH,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/provider",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -23,57 +23,58 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@noble/hashes": "1.8.0",
|
|
25
25
|
"@polkadot/util": "13.5.7",
|
|
26
|
-
"@prosopo/api": "4.1.
|
|
27
|
-
"@prosopo/api-express-router": "3.1.
|
|
28
|
-
"@prosopo/api-route": "2.6.
|
|
29
|
-
"@prosopo/
|
|
30
|
-
"@prosopo/
|
|
31
|
-
"@prosopo/
|
|
32
|
-
"@prosopo/
|
|
33
|
-
"@prosopo/
|
|
34
|
-
"@prosopo/
|
|
35
|
-
"@prosopo/
|
|
36
|
-
"@prosopo/
|
|
37
|
-
"@prosopo/
|
|
38
|
-
"@prosopo/
|
|
39
|
-
"@prosopo/native-
|
|
26
|
+
"@prosopo/api": "4.1.5",
|
|
27
|
+
"@prosopo/api-express-router": "3.1.81",
|
|
28
|
+
"@prosopo/api-route": "2.6.57",
|
|
29
|
+
"@prosopo/captcha-severity": "1.1.0",
|
|
30
|
+
"@prosopo/common": "3.1.53",
|
|
31
|
+
"@prosopo/database": "4.0.27",
|
|
32
|
+
"@prosopo/datasets": "3.1.77",
|
|
33
|
+
"@prosopo/env": "3.6.50",
|
|
34
|
+
"@prosopo/ipinfo": "0.3.22",
|
|
35
|
+
"@prosopo/keyring": "2.9.84",
|
|
36
|
+
"@prosopo/load-balancer": "2.10.39",
|
|
37
|
+
"@prosopo/locale": "3.4.1",
|
|
38
|
+
"@prosopo/logger": "2.0.8",
|
|
39
|
+
"@prosopo/native-ja4": "0.0.4",
|
|
40
|
+
"@prosopo/native-merkle": "0.0.4",
|
|
40
41
|
"@prosopo/puzzle-assets": "0.1.3",
|
|
41
|
-
"@prosopo/redis-client": "1.0.
|
|
42
|
-
"@prosopo/types": "5.
|
|
43
|
-
"@prosopo/types-database": "5.
|
|
44
|
-
"@prosopo/types-env": "2.10.
|
|
45
|
-
"@prosopo/user-access-policy": "3.12.
|
|
46
|
-
"@prosopo/util": "3.3.
|
|
47
|
-
"@prosopo/util-crypto": "13.5.
|
|
42
|
+
"@prosopo/redis-client": "1.0.34",
|
|
43
|
+
"@prosopo/types": "5.6.0",
|
|
44
|
+
"@prosopo/types-database": "5.4.0",
|
|
45
|
+
"@prosopo/types-env": "2.10.44",
|
|
46
|
+
"@prosopo/user-access-policy": "3.12.33",
|
|
47
|
+
"@prosopo/util": "3.3.8",
|
|
48
|
+
"@prosopo/util-crypto": "13.5.31",
|
|
48
49
|
"cron": "3.1.7",
|
|
49
50
|
"express": "4.22.2",
|
|
50
51
|
"express-rate-limit": "7.4.0",
|
|
51
52
|
"geolib": "3.3.14",
|
|
52
53
|
"i18next": "24.1.0",
|
|
53
54
|
"ip-address": "10.5.0",
|
|
54
|
-
"mongoose": "
|
|
55
|
+
"mongoose": "9.9.4",
|
|
55
56
|
"prom-client": "15.1.3",
|
|
56
|
-
"uuid": "14.0.
|
|
57
|
+
"uuid": "14.0.2",
|
|
57
58
|
"zod": "3.23.8"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
|
-
"@prosopo/config": "3.3.
|
|
61
|
+
"@prosopo/config": "3.3.13",
|
|
61
62
|
"@types/node": "22.5.5",
|
|
62
63
|
"@types/pg": "8.23.1",
|
|
63
64
|
"@types/uuid": "10.0.0",
|
|
64
|
-
"@vitest/coverage-v8": "4.1.
|
|
65
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
65
66
|
"concurrently": "9.0.1",
|
|
66
67
|
"cors": "2.8.6",
|
|
67
68
|
"del-cli": "6.0.0",
|
|
68
69
|
"dotenv": "16.4.5",
|
|
69
70
|
"npm-run-all": "4.1.5",
|
|
70
|
-
"testcontainers": "
|
|
71
|
+
"testcontainers": "12.1.0",
|
|
71
72
|
"tslib": "2.7.0",
|
|
72
73
|
"tsx": "4.20.3",
|
|
73
74
|
"typescript": "5.6.2",
|
|
74
75
|
"undici": "6.28.0",
|
|
75
76
|
"vite": "8.1.5",
|
|
76
|
-
"vitest": "4.1.
|
|
77
|
+
"vitest": "4.1.11"
|
|
77
78
|
},
|
|
78
79
|
"repository": {
|
|
79
80
|
"type": "git",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ContextType, type IUserSettings } from "@prosopo/types";
|
|
2
|
-
export declare function determineContextType(webView: boolean): ContextType;
|
|
3
|
-
export declare function getContextThreshold(settings: IUserSettings, contextType: ContextType): number;
|
|
4
|
-
//# sourceMappingURL=contextAwareValidation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextAwareValidation.d.ts","sourceRoot":"","sources":["../../../src/api/captcha/contextAwareValidation.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EACX,KAAK,aAAa,EAElB,MAAM,gBAAgB,CAAC;AAOxB,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAElE;AAQD,wBAAgB,mBAAmB,CAClC,QAAQ,EAAE,aAAa,EACvB,WAAW,EAAE,WAAW,GACtB,MAAM,CAkBR"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ContextType, contextAwareThresholdDefault } from "@prosopo/types";
|
|
2
|
-
//#region src/api/captcha/contextAwareValidation.ts
|
|
3
|
-
/**
|
|
4
|
-
* Determines the context type based on the webView flag
|
|
5
|
-
* @param webView - Whether the request is from a WebView
|
|
6
|
-
* @returns The context type (Webview or Default)
|
|
7
|
-
*/
|
|
8
|
-
function determineContextType(webView) {
|
|
9
|
-
return webView ? ContextType.Webview : ContextType.Default;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Gets the threshold for a specific context type from client settings
|
|
13
|
-
* @param settings - Client settings
|
|
14
|
-
* @param contextType - The context type to get the threshold for
|
|
15
|
-
* @returns The threshold for the context type, or the global threshold if not configured
|
|
16
|
-
*/
|
|
17
|
-
function getContextThreshold(settings, contextType) {
|
|
18
|
-
const contextAware = settings.contextAware;
|
|
19
|
-
if (contextAware === void 0) return contextAwareThresholdDefault;
|
|
20
|
-
const contexts = contextAware.contexts;
|
|
21
|
-
let contextConfig;
|
|
22
|
-
if (contexts !== void 0) contextConfig = contexts[contextType];
|
|
23
|
-
return contextConfig?.threshold ?? contextAwareThresholdDefault;
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { determineContextType, getContextThreshold };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextAwareValidation.js","sourceRoot":"","sources":["../../../src/api/captcha/contextAwareValidation.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EAEX,4BAA4B,GAC5B,MAAM,gBAAgB,CAAC;AAOxB,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACpD,OAAO,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC;AAC5D,CAAC;AAQD,MAAM,UAAU,mBAAmB,CAClC,QAAuB,EACvB,WAAwB;IAExB,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC3C,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,4BAA4B,CAAC;IACrC,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC;IACvC,IAAI,aAAmE,CAAC;IAExE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,aAAa,GACZ,QAGA,CAAC,WAAW,CAAC,CAAC;IAChB,CAAC;IAED,OAAO,aAAa,EAAE,SAAS,IAAI,4BAA4B,CAAC;AACjE,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
let _prosopo_types = require("@prosopo/types");
|
|
2
|
-
//#region src/api/captcha/contextAwareValidation.ts
|
|
3
|
-
/**
|
|
4
|
-
* Determines the context type based on the webView flag
|
|
5
|
-
* @param webView - Whether the request is from a WebView
|
|
6
|
-
* @returns The context type (Webview or Default)
|
|
7
|
-
*/
|
|
8
|
-
function determineContextType(webView) {
|
|
9
|
-
return webView ? _prosopo_types.ContextType.Webview : _prosopo_types.ContextType.Default;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Gets the threshold for a specific context type from client settings
|
|
13
|
-
* @param settings - Client settings
|
|
14
|
-
* @param contextType - The context type to get the threshold for
|
|
15
|
-
* @returns The threshold for the context type, or the global threshold if not configured
|
|
16
|
-
*/
|
|
17
|
-
function getContextThreshold(settings, contextType) {
|
|
18
|
-
const contextAware = settings.contextAware;
|
|
19
|
-
if (contextAware === void 0) return _prosopo_types.contextAwareThresholdDefault;
|
|
20
|
-
const contexts = contextAware.contexts;
|
|
21
|
-
let contextConfig;
|
|
22
|
-
if (contexts !== void 0) contextConfig = contexts[contextType];
|
|
23
|
-
return contextConfig?.threshold ?? _prosopo_types.contextAwareThresholdDefault;
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
exports.determineContextType = determineContextType;
|
|
27
|
-
exports.getContextThreshold = getContextThreshold;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextAwareValidation.unit.test.d.ts","sourceRoot":"","sources":["../../../../src/tests/unit/api/contextAwareValidation.unit.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { ContextType, contextAwareThresholdDefault, } from "@prosopo/types";
|
|
2
|
-
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { determineContextType, getContextThreshold, } from "../../../api/captcha/contextAwareValidation.js";
|
|
4
|
-
describe("contextAwareValidation", () => {
|
|
5
|
-
describe("determineContextType", () => {
|
|
6
|
-
it("should return ContextType.Webview when webView is true", () => {
|
|
7
|
-
const result = determineContextType(true);
|
|
8
|
-
expect(result).toBe(ContextType.Webview);
|
|
9
|
-
});
|
|
10
|
-
it("should return ContextType.Default when webView is false", () => {
|
|
11
|
-
const result = determineContextType(false);
|
|
12
|
-
expect(result).toBe(ContextType.Default);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
describe("getContextThreshold", () => {
|
|
16
|
-
it("should return default threshold when contextAware is not set", () => {
|
|
17
|
-
const settings = {};
|
|
18
|
-
const result = getContextThreshold(settings, ContextType.Default);
|
|
19
|
-
expect(result).toBe(contextAwareThresholdDefault);
|
|
20
|
-
});
|
|
21
|
-
it("should return global threshold when no context-specific threshold is set", () => {
|
|
22
|
-
const settings = {
|
|
23
|
-
contextAware: {
|
|
24
|
-
enabled: true,
|
|
25
|
-
contexts: {
|
|
26
|
-
[ContextType.Default]: {
|
|
27
|
-
type: ContextType.Default,
|
|
28
|
-
threshold: 0.8,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
const result = getContextThreshold(settings, ContextType.Default);
|
|
34
|
-
expect(result).toBe(0.8);
|
|
35
|
-
});
|
|
36
|
-
it("should return context-specific threshold when configured", () => {
|
|
37
|
-
const settings = {
|
|
38
|
-
contextAware: {
|
|
39
|
-
enabled: true,
|
|
40
|
-
contexts: {
|
|
41
|
-
[ContextType.Webview]: {
|
|
42
|
-
type: ContextType.Webview,
|
|
43
|
-
threshold: 0.9,
|
|
44
|
-
},
|
|
45
|
-
[ContextType.Default]: {
|
|
46
|
-
type: ContextType.Default,
|
|
47
|
-
threshold: 0.6,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
const webviewResult = getContextThreshold(settings, ContextType.Webview);
|
|
53
|
-
expect(webviewResult).toBe(0.9);
|
|
54
|
-
const defaultResult = getContextThreshold(settings, ContextType.Default);
|
|
55
|
-
expect(defaultResult).toBe(0.6);
|
|
56
|
-
});
|
|
57
|
-
it("should return default threshold when context not found in object", () => {
|
|
58
|
-
const settings = {
|
|
59
|
-
contextAware: {
|
|
60
|
-
enabled: true,
|
|
61
|
-
contexts: {
|
|
62
|
-
[ContextType.Webview]: {
|
|
63
|
-
type: ContextType.Webview,
|
|
64
|
-
threshold: 0.9,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
const result = getContextThreshold(settings, ContextType.Default);
|
|
70
|
-
expect(result).toBe(contextAwareThresholdDefault);
|
|
71
|
-
});
|
|
72
|
-
it("should handle empty contexts object", () => {
|
|
73
|
-
const settings = {
|
|
74
|
-
contextAware: {
|
|
75
|
-
enabled: true,
|
|
76
|
-
contexts: {},
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
const result = getContextThreshold(settings, ContextType.Default);
|
|
80
|
-
expect(result).toBe(contextAwareThresholdDefault);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
//# sourceMappingURL=contextAwareValidation.unit.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextAwareValidation.unit.test.js","sourceRoot":"","sources":["../../../../src/tests/unit/api/contextAwareValidation.unit.test.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EAEX,4BAA4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