@fedify/fedify 2.1.0-dev.543 → 2.1.0-dev.592
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/dist/accept-D7sAxyNa.js +143 -0
- package/dist/{assert_rejects-Ce45JcFg.js → assert_rejects-0h7I2Esa.js} +1 -1
- package/dist/{builder-BBucr-Bp.js → builder-B24i8eYp.js} +4 -4
- package/dist/{client-Dg7OfUDA.js → client-CoCIaTNO.js} +1 -1
- package/dist/compat/mod.d.cts +3 -3
- package/dist/compat/mod.d.ts +3 -3
- package/dist/compat/transformers.test.js +19 -18
- package/dist/{context-CZ5llAss.js → context-Aqenou7c.js} +1 -1
- package/dist/{context-DL0cPpPV.d.cts → context-BcqA-0BL.d.cts} +52 -2
- package/dist/{context--RwChtri.d.ts → context-DyJjQQ_H.d.ts} +52 -2
- package/dist/{deno-9yc0TPBI.js → deno-OR506Yti.js} +1 -2
- package/dist/{docloader-6Wrqp6SE.js → docloader-BG_pP2fW.js} +3 -3
- package/dist/{esm-DGl7uK1r.js → esm-nLm00z9V.js} +27 -1
- package/dist/federation/builder.test.js +8 -8
- package/dist/federation/collection.test.js +6 -6
- package/dist/federation/handler.test.js +808 -28
- package/dist/federation/idempotency.test.js +24 -23
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +2 -2
- package/dist/federation/kv.test.js +5 -5
- package/dist/federation/middleware.test.js +25 -24
- package/dist/federation/mod.cjs +4 -4
- package/dist/federation/mod.d.cts +4 -4
- package/dist/federation/mod.d.ts +4 -4
- package/dist/federation/mod.js +4 -4
- package/dist/federation/mq.test.js +5 -5
- package/dist/federation/negotiation.test.js +6 -6
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +5 -5
- package/dist/federation/send.test.js +13 -12
- package/dist/federation/webfinger.test.js +24 -23
- package/dist/{http-CpvoK0Y7.js → http-BUCxbGks.js} +145 -50
- package/dist/{http-DsqqmkXi.d.cts → http-BudnHZE2.d.cts} +229 -1
- package/dist/{http-C_9L2wFv.cjs → http-CaXARmaJ.cjs} +307 -50
- package/dist/{http-BbfOqHGG.d.ts → http-Dax_FIBo.d.ts} +229 -1
- package/dist/{http-DxwzIU0F.js → http-DePHjWKP.js} +278 -51
- package/dist/{inbox-DMq3a5bc.js → inbox-D_LU1opv.js} +2 -2
- package/dist/{key-DFG6tJgw.js → key-Cx3Tx_In.js} +2 -2
- package/dist/{kv-cache-B__dHl7g.js → kv-cache-Bw2F2ABq.js} +1 -1
- package/dist/{kv-cache-BHoLc85Z.cjs → kv-cache-CYTDBChd.cjs} +1 -1
- package/dist/{kv-cache-CRRUsyJ9.js → kv-cache-DizRqYX4.js} +1 -1
- package/dist/{ld-DVnRS9IK.js → ld-CLMJw_iX.js} +4 -4
- package/dist/{middleware-D6peKsn1.js → middleware--uATyG9i.js} +95 -18
- package/dist/{middleware-CAk-LkSS.js → middleware-4fo4pEtA.js} +4 -4
- package/dist/{middleware-pUJBhWSu.cjs → middleware-9YDezkYJ.cjs} +94 -17
- package/dist/middleware-C2PqSUaA.js +27 -0
- package/dist/middleware-DNY45l5T.cjs +12 -0
- package/dist/{middleware-FZ0T8vIp.js → middleware-DzICTgdC.js} +115 -36
- package/dist/{mod-DE8MYisy.d.cts → mod-B7QkWzrL.d.cts} +1 -1
- package/dist/{mod-DKG0ovjR.d.cts → mod-Bx9jcLB8.d.cts} +1 -1
- package/dist/{mod-CFBU2OT3.d.cts → mod-Coe7KEgX.d.cts} +1 -1
- package/dist/{mod-BugwI0JN.d.ts → mod-Cs2dYEwI.d.ts} +1 -1
- package/dist/{mod-DcfFNgYf.d.ts → mod-D6MdymW7.d.ts} +1 -1
- package/dist/{mod-CvxylbuV.d.ts → mod-D6dOd--H.d.ts} +1 -1
- package/dist/{mod-Z7lIaCfo.d.ts → mod-SMHOMNpZ.d.ts} +1 -1
- package/dist/{mod-Dp0kK0hO.d.cts → mod-em2Il1eD.d.cts} +1 -1
- package/dist/mod.cjs +12 -4
- package/dist/mod.d.cts +8 -8
- package/dist/mod.d.ts +8 -8
- package/dist/mod.js +9 -5
- package/dist/nodeinfo/client.test.js +7 -7
- package/dist/nodeinfo/handler.test.js +24 -23
- package/dist/nodeinfo/types.test.js +5 -5
- package/dist/otel/exporter.test.js +6 -6
- package/dist/{owner-MCqkZ1KE.js → owner-D5J299vd.js} +1 -1
- package/dist/{proof-D2B3jvnF.js → proof-BBLHhWMC.js} +3 -3
- package/dist/{proof-BF_LZjDb.cjs → proof-BVl5IgbN.cjs} +3 -3
- package/dist/{proof-ooYMfVCa.js → proof-CiCp_mCG.js} +2 -2
- package/dist/{send-DtP5YkuY.js → send-2b0Fn9cn.js} +2 -2
- package/dist/sig/accept.test.d.ts +3 -0
- package/dist/sig/accept.test.js +451 -0
- package/dist/sig/http.test.js +454 -29
- package/dist/sig/key.test.js +8 -8
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.cjs +6 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.js +9 -9
- package/dist/sig/proof.test.js +9 -9
- package/dist/testing/mod.d.ts +1 -1
- package/dist/testing/mod.js +2 -2
- package/dist/utils/docloader.test.js +12 -11
- package/dist/utils/kv-cache.test.js +2 -2
- package/dist/utils/mod.cjs +2 -2
- package/dist/utils/mod.d.cts +2 -2
- package/dist/utils/mod.d.ts +2 -2
- package/dist/utils/mod.js +2 -2
- package/package.json +6 -7
- package/dist/dist-B5f6a8Tt.js +0 -281
- package/dist/middleware-D7yrgd0I.cjs +0 -12
- package/dist/middleware-GmHZnwkU.js +0 -26
- /package/dist/{assert_not_equals-C80BG-_5.js → assert_not_equals-f3m3epl3.js} +0 -0
- /package/dist/{assert_throws-BNXdRGWP.js → assert_throws-rjdMBf31.js} +0 -0
- /package/dist/{collection-CcnIw1qY.js → collection-CSzG2j1P.js} +0 -0
- /package/dist/{keycache-C7k8s1Bk.js → keycache-CpGWAUbj.js} +0 -0
- /package/dist/{keys-ZbcByPg9.js → keys-BFve7QQv.js} +0 -0
- /package/dist/{negotiation-5NPJL6zp.js → negotiation-BlAuS_nr.js} +0 -0
- /package/dist/{retry-D4GJ670a.js → retry-mqLf4b-R.js} +0 -0
- /package/dist/{std__assert-DWivtrGR.js → std__assert-X-_kMxKM.js} +0 -0
package/dist/sig/http.test.js
CHANGED
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { esm_default } from "../esm-nLm00z9V.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import "../
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
10
|
+
import "../deno-OR506Yti.js";
|
|
11
|
+
import "../accept-D7sAxyNa.js";
|
|
12
|
+
import { exportJwk } from "../key-Cx3Tx_In.js";
|
|
13
|
+
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest, verifyRequestDetailed } from "../http-BUCxbGks.js";
|
|
14
|
+
import { assertExists, assertStringIncludes } from "../std__assert-X-_kMxKM.js";
|
|
15
|
+
import { assertFalse, assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
16
|
+
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
|
17
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
18
|
+
import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-BFve7QQv.js";
|
|
19
|
+
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
19
20
|
import { FetchError, exportSpki } from "@fedify/vocab-runtime";
|
|
20
21
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
21
22
|
|
|
@@ -298,7 +299,7 @@ test("signRequest() and verifyRequest() [rfc9421] implementation", async () => {
|
|
|
298
299
|
assertEquals(parsedInput.sig1.alg, "rsa-v1_5-sha256");
|
|
299
300
|
assertEquals(parsedInput.sig1.created, currentTimestamp);
|
|
300
301
|
assertEquals(parsedInput.sig1.components.length, expectedComponents.length, "Should have all expected components");
|
|
301
|
-
for (const component of expectedComponents) assert(parsedInput.sig1.components.
|
|
302
|
+
for (const component of expectedComponents) assert(parsedInput.sig1.components.some((c) => c.value === component), `Components should include ${component}`);
|
|
302
303
|
const parsedSig = parseRfc9421Signature(signature);
|
|
303
304
|
assertExists(parsedSig.sig1);
|
|
304
305
|
assertEquals(parsedSig.sig1.byteLength > 0, true, "Signature value should be a non-empty Uint8Array");
|
|
@@ -323,10 +324,22 @@ test("createRfc9421SignatureBase()", () => {
|
|
|
323
324
|
}
|
|
324
325
|
});
|
|
325
326
|
const components = [
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
{
|
|
328
|
+
value: "@method",
|
|
329
|
+
params: {}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
value: "@target-uri",
|
|
333
|
+
params: {}
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
value: "host",
|
|
337
|
+
params: {}
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
value: "date",
|
|
341
|
+
params: {}
|
|
342
|
+
}
|
|
330
343
|
];
|
|
331
344
|
const created = 1709626184;
|
|
332
345
|
const signatureBase = createRfc9421SignatureBase(request, components, formatRfc9421SignatureParameters({
|
|
@@ -353,9 +366,18 @@ test("formatRfc9421Signature()", () => {
|
|
|
353
366
|
const keyId = new URL("https://example.com/key");
|
|
354
367
|
const algorithm = "rsa-v1_5-sha256";
|
|
355
368
|
const components = [
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
369
|
+
{
|
|
370
|
+
"value": "@method",
|
|
371
|
+
params: {}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"value": "@target-uri",
|
|
375
|
+
params: {}
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"value": "host",
|
|
379
|
+
params: {}
|
|
380
|
+
}
|
|
359
381
|
];
|
|
360
382
|
const created = 1709626184;
|
|
361
383
|
const [signatureInput, signatureHeader] = formatRfc9421Signature(signature, components, formatRfc9421SignatureParameters({
|
|
@@ -373,10 +395,22 @@ test("parseRfc9421SignatureInput()", () => {
|
|
|
373
395
|
assertEquals(parsed.sig1.alg, "rsa-v1_5-sha256");
|
|
374
396
|
assertEquals(parsed.sig1.created, 1709626184);
|
|
375
397
|
assertEquals(parsed.sig1.components, [
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
398
|
+
{
|
|
399
|
+
value: "@method",
|
|
400
|
+
params: {}
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
value: "@target-uri",
|
|
404
|
+
params: {}
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
value: "host",
|
|
408
|
+
params: {}
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
value: "date",
|
|
412
|
+
params: {}
|
|
413
|
+
}
|
|
380
414
|
]);
|
|
381
415
|
assertEquals(parsed.sig1.parameters, "keyid=\"https://example.com/key\";alg=\"rsa-v1_5-sha256\";created=1709626184");
|
|
382
416
|
});
|
|
@@ -626,10 +660,22 @@ test("verifyRequest() [rfc9421] error cases and edge cases", async () => {
|
|
|
626
660
|
assertEquals(parsedInput.sig1.alg, "rsa-v1_5-sha256");
|
|
627
661
|
assertEquals(parsedInput.sig1.created, 1709626184);
|
|
628
662
|
assertEquals(parsedInput.sig1.components, [
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
663
|
+
{
|
|
664
|
+
value: "@method",
|
|
665
|
+
params: {}
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
value: "@target-uri",
|
|
669
|
+
params: {}
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
value: "host",
|
|
673
|
+
params: {}
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
value: "date",
|
|
677
|
+
params: {}
|
|
678
|
+
}
|
|
633
679
|
]);
|
|
634
680
|
const signature = testRequest.headers.get("Signature") || "";
|
|
635
681
|
const parsedSig = parseRfc9421Signature(signature);
|
|
@@ -641,8 +687,8 @@ test("verifyRequest() [rfc9421] error cases and edge cases", async () => {
|
|
|
641
687
|
assertEquals(complexParsedInput.sig1.keyId, "https://example.com/key with spaces");
|
|
642
688
|
assertEquals(complexParsedInput.sig1.alg, "rsa-v1_5-sha256");
|
|
643
689
|
assertEquals(complexParsedInput.sig1.created, 1709626184);
|
|
644
|
-
assert(complexParsedInput.sig1.components.
|
|
645
|
-
assert(complexParsedInput.sig1.components.
|
|
690
|
+
assert(complexParsedInput.sig1.components.some((c) => c.value === "content-type"));
|
|
691
|
+
assert(complexParsedInput.sig1.components.some((c) => c.value === "value with \"quotes\" and spaces"));
|
|
646
692
|
const multiSigRequest = new Request("https://example.com/", { headers: new Headers({
|
|
647
693
|
"Signature-Input": `sig1=("@method");keyid="key1";alg="rsa-v1_5-sha256";created=1709626184,sig2=("@target-uri");keyid="key2";alg="rsa-pss-sha512";created=1709626185`,
|
|
648
694
|
"Signature": `sig1=:AQIDBA==:,sig2=:Zm9vYmFy:`
|
|
@@ -1200,7 +1246,10 @@ test("signRequest() [rfc9421] error handling for invalid signature base creation
|
|
|
1200
1246
|
body: "test body"
|
|
1201
1247
|
});
|
|
1202
1248
|
await assertThrows(() => {
|
|
1203
|
-
createRfc9421SignatureBase(request, [
|
|
1249
|
+
createRfc9421SignatureBase(request, [{
|
|
1250
|
+
value: "@unsupported",
|
|
1251
|
+
params: {}
|
|
1252
|
+
}], "alg=\"rsa-pss-sha256\";keyid=\"https://example.com/key2\";created=1234567890");
|
|
1204
1253
|
}, Error, "Unsupported derived component: @unsupported");
|
|
1205
1254
|
const signedRequest = await signRequest(request, rsaPrivateKey2, new URL("https://example.com/key2"), { spec: "rfc9421" });
|
|
1206
1255
|
assertExists(signedRequest.headers.get("Signature-Input"));
|
|
@@ -1312,5 +1361,381 @@ test("signRequest() and verifyRequest() cancellation", {
|
|
|
1312
1361
|
});
|
|
1313
1362
|
esm_default.hardReset();
|
|
1314
1363
|
});
|
|
1364
|
+
test("signRequest() with custom label", async () => {
|
|
1365
|
+
const request = new Request("https://example.com/api", {
|
|
1366
|
+
method: "POST",
|
|
1367
|
+
body: "test",
|
|
1368
|
+
headers: { "Content-Type": "text/plain" }
|
|
1369
|
+
});
|
|
1370
|
+
const signed = await signRequest(request, rsaPrivateKey2, new URL("https://example.com/key2"), {
|
|
1371
|
+
spec: "rfc9421",
|
|
1372
|
+
rfc9421: { label: "mysig" }
|
|
1373
|
+
});
|
|
1374
|
+
const sigInput = signed.headers.get("Signature-Input");
|
|
1375
|
+
assertStringIncludes(sigInput, "mysig=");
|
|
1376
|
+
const sig = signed.headers.get("Signature");
|
|
1377
|
+
assertStringIncludes(sig, "mysig=");
|
|
1378
|
+
});
|
|
1379
|
+
test("signRequest() with custom components", async () => {
|
|
1380
|
+
const request = new Request("https://example.com/api", {
|
|
1381
|
+
method: "POST",
|
|
1382
|
+
body: "test",
|
|
1383
|
+
headers: {
|
|
1384
|
+
"Content-Type": "text/plain",
|
|
1385
|
+
"Host": "example.com",
|
|
1386
|
+
"Date": "Tue, 05 Mar 2024 07:49:44 GMT"
|
|
1387
|
+
}
|
|
1388
|
+
});
|
|
1389
|
+
const signed = await signRequest(request, rsaPrivateKey2, new URL("https://example.com/key2"), {
|
|
1390
|
+
spec: "rfc9421",
|
|
1391
|
+
rfc9421: { components: [
|
|
1392
|
+
{
|
|
1393
|
+
value: "@method",
|
|
1394
|
+
params: {}
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
value: "@target-uri",
|
|
1398
|
+
params: {}
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
value: "@authority",
|
|
1402
|
+
params: {}
|
|
1403
|
+
}
|
|
1404
|
+
] }
|
|
1405
|
+
});
|
|
1406
|
+
const sigInput = signed.headers.get("Signature-Input");
|
|
1407
|
+
assertStringIncludes(sigInput, "\"@method\"");
|
|
1408
|
+
assertStringIncludes(sigInput, "\"@target-uri\"");
|
|
1409
|
+
assertStringIncludes(sigInput, "\"@authority\"");
|
|
1410
|
+
assertStringIncludes(sigInput, "\"content-digest\"");
|
|
1411
|
+
});
|
|
1412
|
+
test("signRequest() with nonce and tag", async () => {
|
|
1413
|
+
const request = new Request("https://example.com/api", {
|
|
1414
|
+
method: "GET",
|
|
1415
|
+
headers: {
|
|
1416
|
+
"Host": "example.com",
|
|
1417
|
+
"Date": "Tue, 05 Mar 2024 07:49:44 GMT"
|
|
1418
|
+
}
|
|
1419
|
+
});
|
|
1420
|
+
const signed = await signRequest(request, rsaPrivateKey2, new URL("https://example.com/key2"), {
|
|
1421
|
+
spec: "rfc9421",
|
|
1422
|
+
rfc9421: {
|
|
1423
|
+
nonce: "test-nonce-123",
|
|
1424
|
+
tag: "app-v1"
|
|
1425
|
+
}
|
|
1426
|
+
});
|
|
1427
|
+
const sigInput = signed.headers.get("Signature-Input");
|
|
1428
|
+
assertStringIncludes(sigInput, "nonce=\"test-nonce-123\"");
|
|
1429
|
+
assertStringIncludes(sigInput, "tag=\"app-v1\"");
|
|
1430
|
+
});
|
|
1431
|
+
test("formatRfc9421SignatureParameters() escapes nonce and tag", () => {
|
|
1432
|
+
const commonParams = {
|
|
1433
|
+
algorithm: "rsa-v1_5-sha256",
|
|
1434
|
+
keyId: new URL("https://example.com/key"),
|
|
1435
|
+
created: 1709626184
|
|
1436
|
+
};
|
|
1437
|
+
const slashNonce = formatRfc9421SignatureParameters({
|
|
1438
|
+
...commonParams,
|
|
1439
|
+
nonce: "x\\y"
|
|
1440
|
+
});
|
|
1441
|
+
assertStringIncludes(slashNonce, "nonce=\"x\\\\y\"");
|
|
1442
|
+
const quoteNonce = formatRfc9421SignatureParameters({
|
|
1443
|
+
...commonParams,
|
|
1444
|
+
nonce: "a\"b"
|
|
1445
|
+
});
|
|
1446
|
+
assertStringIncludes(quoteNonce, "nonce=\"a\\\"b\"");
|
|
1447
|
+
const slashTag = formatRfc9421SignatureParameters({
|
|
1448
|
+
...commonParams,
|
|
1449
|
+
tag: "x\\y"
|
|
1450
|
+
});
|
|
1451
|
+
assertStringIncludes(slashTag, "tag=\"x\\\\y\"");
|
|
1452
|
+
const quoteTag = formatRfc9421SignatureParameters({
|
|
1453
|
+
...commonParams,
|
|
1454
|
+
tag: "a\"b"
|
|
1455
|
+
});
|
|
1456
|
+
assertStringIncludes(quoteTag, "tag=\"a\\\"b\"");
|
|
1457
|
+
const mixed = formatRfc9421SignatureParameters({
|
|
1458
|
+
...commonParams,
|
|
1459
|
+
nonce: "n\"o\\nce",
|
|
1460
|
+
tag: "t\"ag\\value"
|
|
1461
|
+
});
|
|
1462
|
+
assertStringIncludes(mixed, "nonce=\"n\\\"o\\\\nce\"");
|
|
1463
|
+
assertStringIncludes(mixed, "tag=\"t\\\"ag\\\\value\"");
|
|
1464
|
+
});
|
|
1465
|
+
test("signRequest() [rfc9421] accumulates multiple signatures when called sequentially", async () => {
|
|
1466
|
+
const request = new Request("https://example.com/inbox", {
|
|
1467
|
+
method: "POST",
|
|
1468
|
+
body: "Hello",
|
|
1469
|
+
headers: { "Content-Type": "text/plain" }
|
|
1470
|
+
});
|
|
1471
|
+
const onceSigned = await signRequest(request, rsaPrivateKey2, new URL("https://example.com/key2"), {
|
|
1472
|
+
spec: "rfc9421",
|
|
1473
|
+
rfc9421: {
|
|
1474
|
+
label: "sig1",
|
|
1475
|
+
components: [{
|
|
1476
|
+
value: "@method",
|
|
1477
|
+
params: {}
|
|
1478
|
+
}, {
|
|
1479
|
+
value: "@target-uri",
|
|
1480
|
+
params: {}
|
|
1481
|
+
}]
|
|
1482
|
+
}
|
|
1483
|
+
});
|
|
1484
|
+
const twiceSigned = await signRequest(onceSigned, rsaPrivateKey2, new URL("https://example.com/key2"), {
|
|
1485
|
+
spec: "rfc9421",
|
|
1486
|
+
rfc9421: {
|
|
1487
|
+
label: "sig2",
|
|
1488
|
+
components: [{
|
|
1489
|
+
value: "@authority",
|
|
1490
|
+
params: {}
|
|
1491
|
+
}]
|
|
1492
|
+
}
|
|
1493
|
+
});
|
|
1494
|
+
const sigInput = twiceSigned.headers.get("Signature-Input") ?? "";
|
|
1495
|
+
const sig = twiceSigned.headers.get("Signature") ?? "";
|
|
1496
|
+
assertStringIncludes(sigInput, "sig1=");
|
|
1497
|
+
assertStringIncludes(sigInput, "sig2=");
|
|
1498
|
+
assertStringIncludes(sig, "sig1=");
|
|
1499
|
+
assertStringIncludes(sig, "sig2=");
|
|
1500
|
+
});
|
|
1501
|
+
test("doubleKnock(): Accept-Signature challenge retry succeeds", async () => {
|
|
1502
|
+
esm_default.spyGlobal();
|
|
1503
|
+
let requestCount = 0;
|
|
1504
|
+
esm_default.post("https://example.com/inbox-challenge-ok", (cl) => {
|
|
1505
|
+
const req = cl.request;
|
|
1506
|
+
requestCount++;
|
|
1507
|
+
if (requestCount === 1) return new Response("Not Authorized", {
|
|
1508
|
+
status: 401,
|
|
1509
|
+
headers: { "Accept-Signature": "sig1=(\"@method\" \"@target-uri\" \"@authority\" \"content-digest\");created;nonce=\"challenge-nonce-1\"" }
|
|
1510
|
+
});
|
|
1511
|
+
const sigInput = req.headers.get("Signature-Input") ?? "";
|
|
1512
|
+
if (sigInput.includes("challenge-nonce-1")) return new Response("", { status: 202 });
|
|
1513
|
+
return new Response("Bad", { status: 400 });
|
|
1514
|
+
});
|
|
1515
|
+
const request = new Request("https://example.com/inbox-challenge-ok", {
|
|
1516
|
+
method: "POST",
|
|
1517
|
+
body: "Test message",
|
|
1518
|
+
headers: { "Content-Type": "text/plain" }
|
|
1519
|
+
});
|
|
1520
|
+
const response = await doubleKnock(request, {
|
|
1521
|
+
keyId: rsaPublicKey2.id,
|
|
1522
|
+
privateKey: rsaPrivateKey2
|
|
1523
|
+
});
|
|
1524
|
+
assertEquals(response.status, 202);
|
|
1525
|
+
assertEquals(requestCount, 2);
|
|
1526
|
+
esm_default.hardReset();
|
|
1527
|
+
});
|
|
1528
|
+
test("doubleKnock(): unfulfillable Accept-Signature falls to legacy fallback", async () => {
|
|
1529
|
+
esm_default.spyGlobal();
|
|
1530
|
+
let requestCount = 0;
|
|
1531
|
+
esm_default.post("https://example.com/inbox-unfulfillable", (cl) => {
|
|
1532
|
+
const req = cl.request;
|
|
1533
|
+
requestCount++;
|
|
1534
|
+
if (requestCount === 1) return new Response("Not Authorized", {
|
|
1535
|
+
status: 401,
|
|
1536
|
+
headers: { "Accept-Signature": "sig1=(\"@method\");alg=\"ecdsa-p256-sha256\"" }
|
|
1537
|
+
});
|
|
1538
|
+
if (req.headers.has("Signature") && !req.headers.has("Signature-Input")) return new Response("", { status: 202 });
|
|
1539
|
+
return new Response("Bad", { status: 400 });
|
|
1540
|
+
});
|
|
1541
|
+
const request = new Request("https://example.com/inbox-unfulfillable", {
|
|
1542
|
+
method: "POST",
|
|
1543
|
+
body: "Test message",
|
|
1544
|
+
headers: { "Content-Type": "text/plain" }
|
|
1545
|
+
});
|
|
1546
|
+
const response = await doubleKnock(request, {
|
|
1547
|
+
keyId: rsaPublicKey2.id,
|
|
1548
|
+
privateKey: rsaPrivateKey2
|
|
1549
|
+
});
|
|
1550
|
+
assertEquals(response.status, 202);
|
|
1551
|
+
assertEquals(requestCount, 2);
|
|
1552
|
+
esm_default.hardReset();
|
|
1553
|
+
});
|
|
1554
|
+
test("doubleKnock(): no Accept-Signature falls to legacy fallback", async () => {
|
|
1555
|
+
esm_default.spyGlobal();
|
|
1556
|
+
let requestCount = 0;
|
|
1557
|
+
esm_default.post("https://example.com/inbox-no-challenge", (cl) => {
|
|
1558
|
+
const req = cl.request;
|
|
1559
|
+
requestCount++;
|
|
1560
|
+
if (requestCount === 1) return new Response("Not Authorized", { status: 401 });
|
|
1561
|
+
if (req.headers.has("Signature")) return new Response("", { status: 202 });
|
|
1562
|
+
return new Response("Bad", { status: 400 });
|
|
1563
|
+
});
|
|
1564
|
+
const request = new Request("https://example.com/inbox-no-challenge", {
|
|
1565
|
+
method: "POST",
|
|
1566
|
+
body: "Test message",
|
|
1567
|
+
headers: { "Content-Type": "text/plain" }
|
|
1568
|
+
});
|
|
1569
|
+
const response = await doubleKnock(request, {
|
|
1570
|
+
keyId: rsaPublicKey2.id,
|
|
1571
|
+
privateKey: rsaPrivateKey2
|
|
1572
|
+
});
|
|
1573
|
+
assertEquals(response.status, 202);
|
|
1574
|
+
assertEquals(requestCount, 2);
|
|
1575
|
+
esm_default.hardReset();
|
|
1576
|
+
});
|
|
1577
|
+
test("doubleKnock(): challenge retry also fails → legacy fallback attempted", async () => {
|
|
1578
|
+
esm_default.spyGlobal();
|
|
1579
|
+
let requestCount = 0;
|
|
1580
|
+
esm_default.post("https://example.com/inbox-challenge-fails", (cl) => {
|
|
1581
|
+
const req = cl.request;
|
|
1582
|
+
requestCount++;
|
|
1583
|
+
if (requestCount === 1) return new Response("Not Authorized", {
|
|
1584
|
+
status: 401,
|
|
1585
|
+
headers: { "Accept-Signature": "sig1=(\"@method\" \"@target-uri\");created" }
|
|
1586
|
+
});
|
|
1587
|
+
if (requestCount === 2) return new Response("Still Not Authorized", { status: 401 });
|
|
1588
|
+
if (req.headers.has("Signature") && !req.headers.has("Signature-Input")) return new Response("", { status: 202 });
|
|
1589
|
+
return new Response("Bad", { status: 400 });
|
|
1590
|
+
});
|
|
1591
|
+
const request = new Request("https://example.com/inbox-challenge-fails", {
|
|
1592
|
+
method: "POST",
|
|
1593
|
+
body: "Test message",
|
|
1594
|
+
headers: { "Content-Type": "text/plain" }
|
|
1595
|
+
});
|
|
1596
|
+
const response = await doubleKnock(request, {
|
|
1597
|
+
keyId: rsaPublicKey2.id,
|
|
1598
|
+
privateKey: rsaPrivateKey2
|
|
1599
|
+
});
|
|
1600
|
+
assertEquals(response.status, 202);
|
|
1601
|
+
assertEquals(requestCount, 3);
|
|
1602
|
+
esm_default.hardReset();
|
|
1603
|
+
});
|
|
1604
|
+
test("doubleKnock(): challenge retry returns another challenge → not followed", async () => {
|
|
1605
|
+
esm_default.spyGlobal();
|
|
1606
|
+
let requestCount = 0;
|
|
1607
|
+
esm_default.post("https://example.com/inbox-challenge-loop", (cl) => {
|
|
1608
|
+
const req = cl.request;
|
|
1609
|
+
requestCount++;
|
|
1610
|
+
if (requestCount === 1) return new Response("Not Authorized", {
|
|
1611
|
+
status: 401,
|
|
1612
|
+
headers: { "Accept-Signature": "sig1=(\"@method\" \"@target-uri\");created;nonce=\"nonce-1\"" }
|
|
1613
|
+
});
|
|
1614
|
+
if (requestCount === 2) return new Response("Still Not Authorized", {
|
|
1615
|
+
status: 401,
|
|
1616
|
+
headers: { "Accept-Signature": "sig1=(\"@method\" \"@target-uri\");created;nonce=\"nonce-2\"" }
|
|
1617
|
+
});
|
|
1618
|
+
if (req.headers.has("Signature") && !req.headers.has("Signature-Input")) return new Response("", { status: 202 });
|
|
1619
|
+
return new Response("Bad", { status: 400 });
|
|
1620
|
+
});
|
|
1621
|
+
const request = new Request("https://example.com/inbox-challenge-loop", {
|
|
1622
|
+
method: "POST",
|
|
1623
|
+
body: "Test message",
|
|
1624
|
+
headers: { "Content-Type": "text/plain" }
|
|
1625
|
+
});
|
|
1626
|
+
const response = await doubleKnock(request, {
|
|
1627
|
+
keyId: rsaPublicKey2.id,
|
|
1628
|
+
privateKey: rsaPrivateKey2
|
|
1629
|
+
});
|
|
1630
|
+
assertEquals(response.status, 202);
|
|
1631
|
+
assertEquals(requestCount, 3);
|
|
1632
|
+
esm_default.hardReset();
|
|
1633
|
+
});
|
|
1634
|
+
test("doubleKnock(): Accept-Signature with unsupported component falls to legacy fallback", async () => {
|
|
1635
|
+
esm_default.spyGlobal();
|
|
1636
|
+
let requestCount = 0;
|
|
1637
|
+
esm_default.post("https://example.com/inbox-bad-challenge", (cl) => {
|
|
1638
|
+
const req = cl.request;
|
|
1639
|
+
requestCount++;
|
|
1640
|
+
if (requestCount === 1) return new Response("Not Authorized", {
|
|
1641
|
+
status: 401,
|
|
1642
|
+
headers: { "Accept-Signature": "sig1=(\"@method\" \"@target-uri\" \"x-custom-required\");created" }
|
|
1643
|
+
});
|
|
1644
|
+
if (req.headers.has("Signature") && !req.headers.has("Signature-Input")) return new Response("", { status: 202 });
|
|
1645
|
+
return new Response("Bad", { status: 400 });
|
|
1646
|
+
});
|
|
1647
|
+
const request = new Request("https://example.com/inbox-bad-challenge", {
|
|
1648
|
+
method: "POST",
|
|
1649
|
+
body: "Test message",
|
|
1650
|
+
headers: { "Content-Type": "text/plain" }
|
|
1651
|
+
});
|
|
1652
|
+
const response = await doubleKnock(request, {
|
|
1653
|
+
keyId: rsaPublicKey2.id,
|
|
1654
|
+
privateKey: rsaPrivateKey2
|
|
1655
|
+
});
|
|
1656
|
+
assertEquals(response.status, 202);
|
|
1657
|
+
assertEquals(requestCount, 2);
|
|
1658
|
+
esm_default.hardReset();
|
|
1659
|
+
});
|
|
1660
|
+
test("doubleKnock(): Accept-Signature with unsupported derived component falls to legacy fallback", async () => {
|
|
1661
|
+
esm_default.spyGlobal();
|
|
1662
|
+
let requestCount = 0;
|
|
1663
|
+
esm_default.post("https://example.com/inbox-bad-derived", (cl) => {
|
|
1664
|
+
const req = cl.request;
|
|
1665
|
+
requestCount++;
|
|
1666
|
+
if (requestCount === 1) return new Response("Not Authorized", {
|
|
1667
|
+
status: 401,
|
|
1668
|
+
headers: { "Accept-Signature": "sig1=(\"@method\" \"@query-param\");created" }
|
|
1669
|
+
});
|
|
1670
|
+
if (req.headers.has("Signature") && !req.headers.has("Signature-Input")) return new Response("", { status: 202 });
|
|
1671
|
+
return new Response("Bad", { status: 400 });
|
|
1672
|
+
});
|
|
1673
|
+
const request = new Request("https://example.com/inbox-bad-derived", {
|
|
1674
|
+
method: "POST",
|
|
1675
|
+
body: "Test message",
|
|
1676
|
+
headers: { "Content-Type": "text/plain" }
|
|
1677
|
+
});
|
|
1678
|
+
const response = await doubleKnock(request, {
|
|
1679
|
+
keyId: rsaPublicKey2.id,
|
|
1680
|
+
privateKey: rsaPrivateKey2
|
|
1681
|
+
});
|
|
1682
|
+
assertEquals(response.status, 202);
|
|
1683
|
+
assertEquals(requestCount, 2);
|
|
1684
|
+
esm_default.hardReset();
|
|
1685
|
+
});
|
|
1686
|
+
test("doubleKnock(): Accept-Signature with multiple entries where first throws falls to next entry", async () => {
|
|
1687
|
+
esm_default.spyGlobal();
|
|
1688
|
+
let requestCount = 0;
|
|
1689
|
+
esm_default.post("https://example.com/inbox-multi-challenge", (cl) => {
|
|
1690
|
+
const req = cl.request;
|
|
1691
|
+
requestCount++;
|
|
1692
|
+
if (requestCount === 1) return new Response("Not Authorized", {
|
|
1693
|
+
status: 401,
|
|
1694
|
+
headers: { "Accept-Signature": "sig1=(\"@method\" \"x-nonexistent\");created,sig2=(\"@method\" \"@target-uri\" \"@authority\");created" }
|
|
1695
|
+
});
|
|
1696
|
+
if (req.headers.has("Signature-Input")) return new Response("", { status: 202 });
|
|
1697
|
+
return new Response("Bad", { status: 400 });
|
|
1698
|
+
});
|
|
1699
|
+
const request = new Request("https://example.com/inbox-multi-challenge", {
|
|
1700
|
+
method: "POST",
|
|
1701
|
+
body: "Test message",
|
|
1702
|
+
headers: { "Content-Type": "text/plain" }
|
|
1703
|
+
});
|
|
1704
|
+
const response = await doubleKnock(request, {
|
|
1705
|
+
keyId: rsaPublicKey2.id,
|
|
1706
|
+
privateKey: rsaPrivateKey2
|
|
1707
|
+
});
|
|
1708
|
+
assertEquals(response.status, 202);
|
|
1709
|
+
assertEquals(requestCount, 2);
|
|
1710
|
+
esm_default.hardReset();
|
|
1711
|
+
});
|
|
1712
|
+
test("doubleKnock(): Accept-Signature with multiple compatible entries fulfills all (RFC 9421 §5 MUST)", async () => {
|
|
1713
|
+
esm_default.spyGlobal();
|
|
1714
|
+
let requestCount = 0;
|
|
1715
|
+
esm_default.post("https://example.com/inbox-multi-compat", (cl) => {
|
|
1716
|
+
const req = cl.request;
|
|
1717
|
+
requestCount++;
|
|
1718
|
+
if (requestCount === 1) return new Response("Not Authorized", {
|
|
1719
|
+
status: 401,
|
|
1720
|
+
headers: { "Accept-Signature": "sig1=(\"@method\" \"@target-uri\");created,sig2=(\"@authority\");created;nonce=\"nonce-for-sig2\"" }
|
|
1721
|
+
});
|
|
1722
|
+
const sigInput = req.headers.get("Signature-Input") ?? "";
|
|
1723
|
+
const sig = req.headers.get("Signature") ?? "";
|
|
1724
|
+
if (sigInput.includes("sig1=") && sigInput.includes("sig2=") && sig.includes("sig1=") && sig.includes("sig2=")) return new Response("", { status: 202 });
|
|
1725
|
+
return new Response("Missing signatures", { status: 400 });
|
|
1726
|
+
});
|
|
1727
|
+
const request = new Request("https://example.com/inbox-multi-compat", {
|
|
1728
|
+
method: "POST",
|
|
1729
|
+
body: "Test message",
|
|
1730
|
+
headers: { "Content-Type": "text/plain" }
|
|
1731
|
+
});
|
|
1732
|
+
const response = await doubleKnock(request, {
|
|
1733
|
+
keyId: rsaPublicKey2.id,
|
|
1734
|
+
privateKey: rsaPrivateKey2
|
|
1735
|
+
});
|
|
1736
|
+
assertEquals(response.status, 202);
|
|
1737
|
+
assertEquals(requestCount, 2);
|
|
1738
|
+
esm_default.hardReset();
|
|
1739
|
+
});
|
|
1315
1740
|
|
|
1316
1741
|
//#endregion
|
package/dist/sig/key.test.js
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { createTestTracerProvider, mockDocumentLoader, test } from "../dist-B5f6a8Tt.js";
|
|
7
6
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
7
|
import "../assert-MZs1qjMx.js";
|
|
9
8
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import { exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-
|
|
12
|
-
import "../std__assert-
|
|
13
|
-
import { assertRejects } from "../assert_rejects-
|
|
14
|
-
import { assertThrows } from "../assert_throws-
|
|
15
|
-
import "../assert_not_equals-
|
|
16
|
-
import { ed25519Multikey, rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
|
9
|
+
import "../deno-OR506Yti.js";
|
|
10
|
+
import { exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-Cx3Tx_In.js";
|
|
11
|
+
import "../std__assert-X-_kMxKM.js";
|
|
12
|
+
import { assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
13
|
+
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
|
14
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
15
|
+
import { ed25519Multikey, rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey3 } from "../keys-BFve7QQv.js";
|
|
16
|
+
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
17
17
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
18
18
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
19
19
|
|
package/dist/sig/ld.test.js
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { mockDocumentLoader, test } from "../dist-B5f6a8Tt.js";
|
|
7
6
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
7
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
-
import "../deno-
|
|
10
|
-
import { generateCryptoKeyPair } from "../key-
|
|
11
|
-
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-
|
|
12
|
-
import { assertFalse, assertRejects } from "../assert_rejects-
|
|
13
|
-
import { assertThrows } from "../assert_throws-
|
|
14
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
|
8
|
+
import "../deno-OR506Yti.js";
|
|
9
|
+
import { generateCryptoKeyPair } from "../key-Cx3Tx_In.js";
|
|
10
|
+
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-CLMJw_iX.js";
|
|
11
|
+
import { assertFalse, assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
12
|
+
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
|
13
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-BFve7QQv.js";
|
|
14
|
+
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
15
15
|
import { CryptographicKey } from "@fedify/vocab";
|
|
16
16
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
17
17
|
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
|
-
const require_http = require('../http-
|
|
6
|
-
const require_proof = require('../proof-
|
|
5
|
+
const require_http = require('../http-CaXARmaJ.cjs');
|
|
6
|
+
const require_proof = require('../proof-BVl5IgbN.cjs');
|
|
7
7
|
require('../sig-vX39WyWI.cjs');
|
|
8
8
|
|
|
9
9
|
exports.attachSignature = require_proof.attachSignature;
|
|
@@ -14,12 +14,16 @@ exports.doesActorOwnKey = require_proof.doesActorOwnKey;
|
|
|
14
14
|
exports.exportJwk = require_http.exportJwk;
|
|
15
15
|
exports.fetchKey = require_http.fetchKey;
|
|
16
16
|
exports.fetchKeyDetailed = require_http.fetchKeyDetailed;
|
|
17
|
+
exports.formatAcceptSignature = require_http.formatAcceptSignature;
|
|
18
|
+
exports.fulfillAcceptSignature = require_http.fulfillAcceptSignature;
|
|
17
19
|
exports.generateCryptoKeyPair = require_http.generateCryptoKeyPair;
|
|
18
20
|
exports.getKeyOwner = require_proof.getKeyOwner;
|
|
19
21
|
exports.importJwk = require_http.importJwk;
|
|
22
|
+
exports.parseAcceptSignature = require_http.parseAcceptSignature;
|
|
20
23
|
exports.signJsonLd = require_proof.signJsonLd;
|
|
21
24
|
exports.signObject = require_proof.signObject;
|
|
22
25
|
exports.signRequest = require_http.signRequest;
|
|
26
|
+
exports.validateAcceptSignature = require_http.validateAcceptSignature;
|
|
23
27
|
exports.verifyJsonLd = require_proof.verifyJsonLd;
|
|
24
28
|
exports.verifyObject = require_proof.verifyObject;
|
|
25
29
|
exports.verifyProof = require_proof.verifyProof;
|
package/dist/sig/mod.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, signRequest, verifyRequest, verifyRequestDetailed } from "../http-
|
|
1
|
+
import { AcceptSignatureMember, AcceptSignatureParameters, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignRequestOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, importJwk, parseAcceptSignature, signRequest, validateAcceptSignature, verifyRequest, verifyRequestDetailed } from "../http-BudnHZE2.cjs";
|
|
2
2
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "../owner-1AbPBOOZ.cjs";
|
|
3
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-
|
|
4
|
-
export { CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
3
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-Coe7KEgX.cjs";
|
|
4
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/mod.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, signRequest, verifyRequest, verifyRequestDetailed } from "../http-
|
|
3
|
+
import { AcceptSignatureMember, AcceptSignatureParameters, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignRequestOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, importJwk, parseAcceptSignature, signRequest, validateAcceptSignature, verifyRequest, verifyRequestDetailed } from "../http-Dax_FIBo.js";
|
|
4
4
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "../owner-gd0Q9FuU.js";
|
|
5
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-
|
|
6
|
-
export { CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
|
5
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-D6dOd--H.js";
|
|
6
|
+
export { AcceptSignatureMember, AcceptSignatureParameters, CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyDetailedResult, FetchKeyErrorResult, FetchKeyOptions, FetchKeyResult, FulfillAcceptSignatureResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, Rfc9421SignRequestOptions, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestDetailedResult, VerifyRequestFailureReason, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|