@intellifend/requestshieldjs 2.0.0-qat.277 → 2.0.0-qat.280
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/README.md +14 -26
- package/dist/checksums.json +5 -5
- package/dist/intellifend.js +2 -2
- package/dist/intellifend.mjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -142,39 +142,23 @@ await fetch("/api/register", {
|
|
|
142
142
|
| `appKey` | Yes | Public app key supplied by IntelliFend. |
|
|
143
143
|
| `apiVersion` | No | Challenge API version: `"v1"` or `"v2"`. Defaults to `"v2"`. |
|
|
144
144
|
| `challengeUrl` | No | Absolute Challenge Server base URL. Defaults to `https://challenge.intellifend.ai`. It must use HTTP(S) and contain no credentials, query, or fragment. |
|
|
145
|
-
| `fallbackChallengeUrl` | No | Approved absolute HTTPS secondary base URL, without credentials, query, or fragment. Omitted by default. An identical normalized primary URL adds no alternate endpoint. |
|
|
146
145
|
| `timeoutMs` | No | Positive whole-flow time budget for create, solve, verify, and retries. Defaults to 5,000 ms. |
|
|
147
146
|
| `protect` | No | Endpoint paths or URLs for Seamless mode, optionally containing named path parameters as described below. Omit or pass an empty list for Manual-only operation. |
|
|
148
147
|
| `telemetry` | No | Enables the optional browser signal collection on API v2. Default `false`; collection stays disabled on v1. |
|
|
149
148
|
|
|
150
149
|
`init()` validates synchronously and throws `IntelliFendError` with code `invalid_config` for invalid input. Reinitialization replaces the previous valid configuration; a failing reinitialization leaves that configuration in place. Unknown configuration keys are ignored.
|
|
151
150
|
|
|
152
|
-
Script-tag integrations use the equivalent attributes `data-app-key`, `data-api-version`, `data-challenge-url`,
|
|
151
|
+
Script-tag integrations use the equivalent attributes `data-app-key`, `data-api-version`, `data-challenge-url`, and `data-protect`. `data-api-version` accepts exactly `"v1"` or `"v2"`; omitting it selects v2. `data-protect` must be a JSON array of strings. The collector accepts only the exact `data-telemetry="true"` and `data-telemetry="false"` values; invalid supplied values use the same sanitized `invalid_config` auto-init warning.
|
|
153
152
|
|
|
154
|
-
Each token flow retains its API version through create, solve, verify, retries,
|
|
155
|
-
|
|
153
|
+
Each token flow retains its API version through create, solve, verify, and retries,
|
|
154
|
+
including when the SDK is reinitialized during that flow.
|
|
156
155
|
This SDK requires WebAssembly and the documented CSP permissions with either
|
|
157
156
|
API version. Integrations pinned to Browser SDK 1.0.0 continue using API v1.
|
|
158
157
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
```javascript
|
|
164
|
-
IntelliFend.init({
|
|
165
|
-
appKey: "YOUR_APP_KEY",
|
|
166
|
-
challengeUrl: "https://challenge.example.com",
|
|
167
|
-
fallbackChallengeUrl: "https://challenge-alt.example.com",
|
|
168
|
-
});
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
URLs are normalized for surrounding whitespace and trailing slashes while retaining path prefixes. No secondary hostname is inferred automatically. A missing or identical fallback preserves the existing single-endpoint behavior.
|
|
172
|
-
|
|
173
|
-
The SDK can retry eligible connection failures through the alternate service.
|
|
174
|
-
All attempts share the configured token timeout, which defaults to 5,000 ms.
|
|
175
|
-
Switching services does not restart that timeout. No cookies or browser storage
|
|
176
|
-
are used. `getToken()` returns a token or `""` if acquisition fails.
|
|
177
|
-
Both services use the selected API version; a v2 failure never retries through v1.
|
|
158
|
+
Custom service URLs are normalized for surrounding whitespace and trailing
|
|
159
|
+
slashes while retaining path prefixes. All attempts share the configured token
|
|
160
|
+
timeout, which defaults to 5,000 ms. `getToken()` returns a token or `""` if
|
|
161
|
+
acquisition fails.
|
|
178
162
|
|
|
179
163
|
### Optional browser signal collection
|
|
180
164
|
|
|
@@ -293,10 +277,14 @@ A Challenge Server proxy must forward binary request and response bodies unchang
|
|
|
293
277
|
|
|
294
278
|
For 2.0, pages with Content Security Policy need `'wasm-unsafe-eval'` in
|
|
295
279
|
`script-src` alongside the approved script origin, `connect-src` permission for
|
|
296
|
-
|
|
280
|
+
the service origins, and `worker-src blob:` for the
|
|
297
281
|
proof-of-work Web Worker. Keep JavaScript evaluation blocked; broad
|
|
298
|
-
`'unsafe-eval'` is unnecessary.
|
|
299
|
-
|
|
282
|
+
`'unsafe-eval'` is unnecessary. For the standard service, allow these connections
|
|
283
|
+
alongside the application's other required sources:
|
|
284
|
+
|
|
285
|
+
```http
|
|
286
|
+
connect-src 'self' https://challenge.intellifend.ai https://challenge.intellifend.org;
|
|
287
|
+
```
|
|
300
288
|
|
|
301
289
|
### Subresource Integrity
|
|
302
290
|
|
package/dist/checksums.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.0-qat.
|
|
2
|
+
"version": "2.0.0-qat.280",
|
|
3
3
|
"algorithm": "sha384",
|
|
4
4
|
"bundles": [
|
|
5
5
|
{
|
|
6
6
|
"name": "intellifend",
|
|
7
7
|
"path": "intellifend.js",
|
|
8
|
-
"version": "2.0.0-qat.
|
|
9
|
-
"integrity": "sha384-
|
|
8
|
+
"version": "2.0.0-qat.280",
|
|
9
|
+
"integrity": "sha384-HeMko4HtBvnIJ0p3JjIbcdH7//zwztMa0OJq8eY4cTwaSrS3pS5eb+cBHYF8aICe"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"name": "intellifend-esm",
|
|
13
13
|
"path": "intellifend.mjs",
|
|
14
|
-
"version": "2.0.0-qat.
|
|
15
|
-
"integrity": "sha384-
|
|
14
|
+
"version": "2.0.0-qat.280",
|
|
15
|
+
"integrity": "sha384-18NqyCXD5myIKdBwEADd2mBcIhKJzP7C+PI6vjdRV/BbaVN18GsVljaj8TXOf91/"
|
|
16
16
|
}
|
|
17
17
|
]
|
|
18
18
|
}
|