@fedify/fedify 2.0.0-pr.474.1879 → 2.0.0-pr.478.1911
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/{actor-DM_mczcz.js → actor-BEbHmVVz.js} +1 -1
- package/dist/{actor-CjcnBLTk.cjs → actor-CPm0e4b4.cjs} +185 -185
- package/dist/{actor-BYv3E3MI.js → actor-Dgz9qUlS.js} +185 -185
- package/dist/{builder-CpW45hts.js → builder-BVYoJn2C.js} +3 -3
- package/dist/compat/mod.d.cts +2 -2
- package/dist/compat/mod.d.ts +2 -2
- package/dist/compat/transformers.test.js +14 -14
- package/dist/{context-Nt2rAqjj.d.cts → context-PxGADCsD.d.cts} +0 -6
- package/dist/{context-DXV-2IZN.d.ts → context-V-XS2_6O.d.ts} +0 -6
- package/dist/{docloader-DPQnUMPZ.js → docloader-BDQQHjqx.js} +2 -2
- package/dist/{esm-CHBTY23R.js → esm-VtMSTJME.js} +1 -1
- package/dist/federation/builder.test.js +4 -4
- package/dist/federation/collection.test.js +2 -2
- package/dist/federation/handler.test.js +15 -15
- package/dist/federation/idempotency.test.js +15 -15
- package/dist/federation/inbox.test.js +3 -3
- package/dist/federation/keycache.test.js +3 -3
- package/dist/federation/kv.test.js +2 -2
- package/dist/federation/middleware.test.js +16 -16
- package/dist/federation/mod.cjs +7 -7
- package/dist/federation/mod.d.cts +1 -1
- package/dist/federation/mod.d.ts +1 -1
- package/dist/federation/mod.js +7 -7
- package/dist/federation/mq.test.js +2 -2
- package/dist/federation/negotiation.test.js +2 -2
- package/dist/federation/retry.test.js +2 -2
- package/dist/federation/router.test.js +2 -2
- package/dist/federation/send.test.js +9 -9
- package/dist/{http-Di-WAayg.js → http-Bl5YIX_S.js} +2 -2
- package/dist/{http-CNbh6Bgj.js → http-C3d93Ppm.js} +2 -2
- package/dist/{http-B1cyhAOR.cjs → http-llzsOORX.cjs} +2 -2
- package/dist/{inbox-CKpjNIIw.js → inbox-CHi6jvdV.js} +1 -1
- package/dist/{key-Bm6xoWJ9.js → key-D3pcXGDF.js} +2 -2
- package/dist/{keycache-BoIUmk-X.js → keycache-BipmycDZ.js} +1 -1
- package/dist/{keys-BJSEmAMh.js → keys-Bgg7z6Pd.js} +1 -1
- package/dist/{kv-cache-ugHk-g8V.cjs → kv-cache-CdQndaN-.cjs} +1 -1
- package/dist/{kv-cache-BCfbzWvV.js → kv-cache-_vPrT0iU.js} +1 -1
- package/dist/{ld-CFrblqOy.js → ld-s9Dt9hRn.js} +2 -2
- package/dist/{lookup-CovW5HO7.js → lookup-C0-b_tpL.js} +1 -1
- package/dist/{lookup-CjRKAy5i.js → lookup-CUKd_qC3.js} +185 -185
- package/dist/{lookup-BKHMnItE.cjs → lookup-DQJHvSnn.cjs} +1 -1
- package/dist/middleware-02LUcLVK.js +26 -0
- package/dist/{middleware-fxZRXc2R.cjs → middleware-ABv9stoA.cjs} +11 -13
- package/dist/middleware-C_toY14Y.js +15 -0
- package/dist/middleware-Mnk8pdxp.cjs +15 -0
- package/dist/{middleware-BCCuNXoU.js → middleware-Xxu6td_B.js} +15 -17
- package/dist/{middleware-DFP98BrZ.js → middleware-fhDwuWD-.js} +11 -13
- package/dist/{mod-CKRSFzK_.d.cts → mod-BoRKfJPE.d.cts} +1 -1
- package/dist/{mod-C_6Uxusd.d.ts → mod-Cdo6SYlJ.d.ts} +1 -1
- package/dist/mod.cjs +7 -7
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +7 -7
- package/dist/nodeinfo/client.test.js +3 -3
- package/dist/nodeinfo/handler.test.js +14 -14
- package/dist/nodeinfo/types.test.js +2 -2
- package/dist/{owner-8cgMngcR.js → owner-e9TTGL6p.js} +2 -2
- package/dist/{proof-BbhNICOW.js → proof-1TgWOPoC.js} +2 -2
- package/dist/{proof-C3woq5fl.cjs → proof-B0RhVXB0.cjs} +3 -3
- package/dist/{proof-OnfETSbB.js → proof-CmAxqoL9.js} +3 -3
- package/dist/{send-zlaQ6fqY.js → send-B9S2n1JD.js} +2 -2
- package/dist/sig/http.test.js +7 -7
- package/dist/sig/key.test.js +5 -5
- package/dist/sig/ld.test.js +6 -6
- package/dist/sig/mod.cjs +4 -4
- package/dist/sig/mod.js +4 -4
- package/dist/sig/owner.test.js +6 -6
- package/dist/sig/proof.test.js +6 -6
- package/dist/testing/docloader.test.js +2 -2
- package/dist/testing/mod.d.ts +0 -6
- package/dist/testing/mod.js +2 -2
- package/dist/{testing-DHsP4t6k.js → testing-DKC0yIkd.js} +1 -1
- package/dist/utils/docloader.test.js +8 -8
- package/dist/utils/kv-cache.test.js +2 -2
- package/dist/utils/mod.cjs +4 -4
- package/dist/utils/mod.js +4 -4
- package/dist/vocab/actor.test.js +4 -4
- package/dist/vocab/lookup.test.js +3 -3
- package/dist/vocab/mod.cjs +3 -3
- package/dist/vocab/mod.js +3 -3
- package/dist/vocab/type.test.js +2 -2
- package/dist/vocab/vocab.test.js +3 -3
- package/dist/{vocab-DMGCHMXF.js → vocab-ClrACgwY.js} +2 -2
- package/dist/{vocab-YXPM77QO.cjs → vocab-Dow_aFkC.cjs} +2 -2
- package/dist/webfinger/handler.test.js +14 -14
- package/dist/webfinger/lookup.test.js +3 -3
- package/dist/webfinger/mod.cjs +1 -1
- package/dist/webfinger/mod.js +1 -1
- package/package.json +3 -3
- package/dist/federation/handler_requirehttpsig.test.d.ts +0 -3
- package/dist/federation/handler_requirehttpsig.test.js +0 -138
- package/dist/middleware-CaQFohcx.js +0 -26
- package/dist/middleware-CqJTYvui.cjs +0 -15
- package/dist/middleware-cA6uI21b.js +0 -15
package/dist/sig/ld.test.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey } from "../lookup-
|
|
6
|
+
import { CryptographicKey } from "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
-
import "../actor-
|
|
10
|
-
import { generateCryptoKeyPair } from "../key-
|
|
11
|
-
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-
|
|
12
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
9
|
+
import "../actor-BEbHmVVz.js";
|
|
10
|
+
import { generateCryptoKeyPair } from "../key-D3pcXGDF.js";
|
|
11
|
+
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-s9Dt9hRn.js";
|
|
12
|
+
import { mockDocumentLoader, test } from "../testing-DKC0yIkd.js";
|
|
13
13
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
14
14
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
|
15
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
|
15
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-Bgg7z6Pd.js";
|
|
16
16
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
17
17
|
|
|
18
18
|
//#region src/sig/ld.test.ts
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
|
-
require('../lookup-
|
|
6
|
-
require('../actor-
|
|
7
|
-
const require_http = require('../http-
|
|
8
|
-
const require_proof = require('../proof-
|
|
5
|
+
require('../lookup-DQJHvSnn.cjs');
|
|
6
|
+
require('../actor-CPm0e4b4.cjs');
|
|
7
|
+
const require_http = require('../http-llzsOORX.cjs');
|
|
8
|
+
const require_proof = require('../proof-B0RhVXB0.cjs');
|
|
9
9
|
require('../sig-YYj5tCnr.cjs');
|
|
10
10
|
|
|
11
11
|
exports.attachSignature = require_proof.attachSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../lookup-
|
|
6
|
-
import "../actor-
|
|
7
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "../http-
|
|
8
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-
|
|
5
|
+
import "../lookup-C0-b_tpL.js";
|
|
6
|
+
import "../actor-Dgz9qUlS.js";
|
|
7
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "../http-Bl5YIX_S.js";
|
|
8
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-CmAxqoL9.js";
|
|
9
9
|
import "../sig-C34-oHBl.js";
|
|
10
10
|
|
|
11
11
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/owner.test.js
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Create, lookupObject } from "../lookup-
|
|
6
|
+
import { Create, lookupObject } from "../lookup-CUKd_qC3.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 "../actor-
|
|
11
|
-
import "../key-
|
|
12
|
-
import { doesActorOwnKey, getKeyOwner } from "../owner-
|
|
13
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import "../actor-BEbHmVVz.js";
|
|
11
|
+
import "../key-D3pcXGDF.js";
|
|
12
|
+
import { doesActorOwnKey, getKeyOwner } from "../owner-e9TTGL6p.js";
|
|
13
|
+
import { mockDocumentLoader, test } from "../testing-DKC0yIkd.js";
|
|
14
14
|
import "../std__assert-DWivtrGR.js";
|
|
15
15
|
import { assertFalse } from "../assert_rejects-Ce45JcFg.js";
|
|
16
16
|
import "../assert_throws-BNXdRGWP.js";
|
|
17
17
|
import "../assert_not_equals-C80BG-_5.js";
|
|
18
|
-
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-
|
|
18
|
+
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-Bgg7z6Pd.js";
|
|
19
19
|
|
|
20
20
|
//#region src/sig/owner.test.ts
|
|
21
21
|
test("doesActorOwnKey()", async () => {
|
package/dist/sig/proof.test.js
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Create, DataIntegrityProof, Multikey, Note, Place } from "../lookup-
|
|
6
|
+
import { Create, DataIntegrityProof, Multikey, Note, Place } from "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../actor-
|
|
11
|
-
import "../key-
|
|
12
|
-
import { createProof, signObject, verifyObject, verifyProof } from "../proof-
|
|
13
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import "../actor-BEbHmVVz.js";
|
|
11
|
+
import "../key-D3pcXGDF.js";
|
|
12
|
+
import { createProof, signObject, verifyObject, verifyProof } from "../proof-1TgWOPoC.js";
|
|
13
|
+
import { mockDocumentLoader, test } from "../testing-DKC0yIkd.js";
|
|
14
14
|
import "../std__assert-DWivtrGR.js";
|
|
15
15
|
import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
16
16
|
import "../assert_throws-BNXdRGWP.js";
|
|
17
17
|
import "../assert_not_equals-C80BG-_5.js";
|
|
18
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
|
18
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-Bgg7z6Pd.js";
|
|
19
19
|
import { decodeMultibase, importMultibaseKey } from "@fedify/vocab-runtime";
|
|
20
20
|
import { decodeHex, encodeHex } from "byte-encodings/hex";
|
|
21
21
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../lookup-
|
|
6
|
+
import "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import { mockDocumentLoader, test } from "../testing-DKC0yIkd.js";
|
|
11
11
|
import "../std__assert-DWivtrGR.js";
|
|
12
12
|
import "../assert_rejects-Ce45JcFg.js";
|
|
13
13
|
import "../assert_throws-BNXdRGWP.js";
|
package/dist/testing/mod.d.ts
CHANGED
|
@@ -8133,12 +8133,6 @@ interface FederationFetchOptions<TContextData> {
|
|
|
8133
8133
|
* @since 0.7.0
|
|
8134
8134
|
*/
|
|
8135
8135
|
onUnauthorized?: (request: Request) => Response | Promise<Response>;
|
|
8136
|
-
/**
|
|
8137
|
-
* Whether to require HTTP Signatures for all incoming activities.
|
|
8138
|
-
* By default, this is `false`
|
|
8139
|
-
* @since 2.0.0
|
|
8140
|
-
*/
|
|
8141
|
-
requireHttpSignature?: boolean;
|
|
8142
8136
|
}
|
|
8143
8137
|
/**
|
|
8144
8138
|
* Additional settings for a custom collection dispatcher.
|
package/dist/testing/mod.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../lookup-
|
|
7
|
-
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-
|
|
6
|
+
import "../lookup-CUKd_qC3.js";
|
|
7
|
+
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-DKC0yIkd.js";
|
|
8
8
|
|
|
9
9
|
export { createInboxContext, createRequestContext, test, testDefinitions };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { RouterError, __require, lookupObject, lookupWebFinger, traverseCollection } from "./lookup-
|
|
6
|
+
import { RouterError, __require, lookupObject, lookupWebFinger, traverseCollection } from "./lookup-CUKd_qC3.js";
|
|
7
7
|
import { configure, getConsoleSink, getLogger, reset } from "@logtape/logtape";
|
|
8
8
|
import { trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../lookup-
|
|
6
|
+
import "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../actor-
|
|
11
|
-
import "../key-
|
|
12
|
-
import { verifyRequest } from "../http-
|
|
13
|
-
import { getAuthenticatedDocumentLoader } from "../docloader-
|
|
14
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import "../actor-BEbHmVVz.js";
|
|
11
|
+
import "../key-D3pcXGDF.js";
|
|
12
|
+
import { verifyRequest } from "../http-C3d93Ppm.js";
|
|
13
|
+
import { getAuthenticatedDocumentLoader } from "../docloader-BDQQHjqx.js";
|
|
14
|
+
import { mockDocumentLoader, test } from "../testing-DKC0yIkd.js";
|
|
15
15
|
import "../std__assert-DWivtrGR.js";
|
|
16
16
|
import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
17
17
|
import "../assert_throws-BNXdRGWP.js";
|
|
18
18
|
import "../assert_not_equals-C80BG-_5.js";
|
|
19
|
-
import { rsaPrivateKey2 } from "../keys-
|
|
20
|
-
import { esm_default } from "../esm-
|
|
19
|
+
import { rsaPrivateKey2 } from "../keys-Bgg7z6Pd.js";
|
|
20
|
+
import { esm_default } from "../esm-VtMSTJME.js";
|
|
21
21
|
import { UrlError } from "@fedify/vocab-runtime";
|
|
22
22
|
|
|
23
23
|
//#region src/utils/docloader.test.ts
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../lookup-
|
|
6
|
+
import "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { MockKvStore, kvCache } from "../kv-cache-DN9pfMBe.js";
|
|
8
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
8
|
+
import { mockDocumentLoader, test } from "../testing-DKC0yIkd.js";
|
|
9
9
|
import { preloadedContexts } from "@fedify/vocab-runtime";
|
|
10
10
|
import { deepStrictEqual, throws } from "node:assert";
|
|
11
11
|
|
package/dist/utils/mod.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
|
-
require('../lookup-
|
|
6
|
-
require('../actor-
|
|
7
|
-
require('../http-
|
|
8
|
-
const require_kv_cache = require('../kv-cache-
|
|
5
|
+
require('../lookup-DQJHvSnn.cjs');
|
|
6
|
+
require('../actor-CPm0e4b4.cjs');
|
|
7
|
+
require('../http-llzsOORX.cjs');
|
|
8
|
+
const require_kv_cache = require('../kv-cache-CdQndaN-.cjs');
|
|
9
9
|
require('../utils-DyRU1gdZ.cjs');
|
|
10
10
|
|
|
11
11
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
package/dist/utils/mod.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../lookup-
|
|
6
|
-
import "../actor-
|
|
7
|
-
import "../http-
|
|
8
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "../kv-cache-
|
|
5
|
+
import "../lookup-C0-b_tpL.js";
|
|
6
|
+
import "../actor-Dgz9qUlS.js";
|
|
7
|
+
import "../http-Bl5YIX_S.js";
|
|
8
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "../kv-cache-_vPrT0iU.js";
|
|
9
9
|
import "../utils-D-Va7aXC.js";
|
|
10
10
|
|
|
11
11
|
export { getAuthenticatedDocumentLoader, kvCache };
|
package/dist/vocab/actor.test.js
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Application, Group, Organization, Person, Service, __export } from "../lookup-
|
|
6
|
+
import { Application, Group, Organization, Person, Service, __export } from "../lookup-CUKd_qC3.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 { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-
|
|
11
|
-
import { test } from "../testing-
|
|
10
|
+
import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-BEbHmVVz.js";
|
|
11
|
+
import { test } from "../testing-DKC0yIkd.js";
|
|
12
12
|
import { assertStrictEquals } from "../std__assert-DWivtrGR.js";
|
|
13
13
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
14
14
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
|
15
15
|
import "../assert_not_equals-C80BG-_5.js";
|
|
16
|
-
import { esm_default } from "../esm-
|
|
16
|
+
import { esm_default } from "../esm-VtMSTJME.js";
|
|
17
17
|
|
|
18
18
|
//#region ../../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js
|
|
19
19
|
var PreconditionFailure = class PreconditionFailure extends Error {
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Collection, Note, Object as Object$1, Person, lookupObject, traverseCollection } from "../lookup-
|
|
6
|
+
import { Collection, Note, Object as Object$1, Person, lookupObject, traverseCollection } from "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import { mockDocumentLoader, test } from "../testing-DKC0yIkd.js";
|
|
11
11
|
import "../std__assert-DWivtrGR.js";
|
|
12
12
|
import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
13
13
|
import "../assert_throws-BNXdRGWP.js";
|
|
14
14
|
import "../assert_not_equals-C80BG-_5.js";
|
|
15
|
-
import { esm_default } from "../esm-
|
|
15
|
+
import { esm_default } from "../esm-VtMSTJME.js";
|
|
16
16
|
|
|
17
17
|
//#region src/vocab/lookup.test.ts
|
|
18
18
|
test("lookupObject()", {
|
package/dist/vocab/mod.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
|
-
require('../lookup-
|
|
6
|
-
const require_actor = require('../actor-
|
|
7
|
-
const require_vocab = require('../vocab-
|
|
5
|
+
require('../lookup-DQJHvSnn.cjs');
|
|
6
|
+
const require_actor = require('../actor-CPm0e4b4.cjs');
|
|
7
|
+
const require_vocab = require('../vocab-Dow_aFkC.cjs');
|
|
8
8
|
|
|
9
9
|
exports.Accept = require_actor.Accept;
|
|
10
10
|
exports.Activity = require_actor.Activity;
|
package/dist/vocab/mod.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../lookup-
|
|
6
|
-
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-
|
|
7
|
-
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-
|
|
5
|
+
import "../lookup-C0-b_tpL.js";
|
|
6
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-Dgz9qUlS.js";
|
|
7
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-ClrACgwY.js";
|
|
8
8
|
|
|
9
9
|
export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
|
package/dist/vocab/type.test.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Person, getTypeId } from "../lookup-
|
|
6
|
+
import { Person, getTypeId } from "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
-
import { test } from "../testing-
|
|
8
|
+
import { test } from "../testing-DKC0yIkd.js";
|
|
9
9
|
|
|
10
10
|
//#region src/vocab/type.test.ts
|
|
11
11
|
test("getTypeId()", () => {
|
package/dist/vocab/vocab.test.js
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Announce, Collection, Create, CryptographicKey, Follow, Hashtag, Link, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, __commonJS, __require, __toESM, vocab_exports } from "../lookup-
|
|
6
|
+
import { Activity, Announce, Collection, Create, CryptographicKey, Follow, Hashtag, Link, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, __commonJS, __require, __toESM, vocab_exports } from "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import { mockDocumentLoader, test } from "../testing-DKC0yIkd.js";
|
|
11
11
|
import "../std__assert-DWivtrGR.js";
|
|
12
12
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
13
13
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
|
14
14
|
import { assertNotEquals } from "../assert_not_equals-C80BG-_5.js";
|
|
15
|
-
import { ed25519PublicKey, rsaPublicKey1 } from "../keys-
|
|
15
|
+
import { ed25519PublicKey, rsaPublicKey1 } from "../keys-Bgg7z6Pd.js";
|
|
16
16
|
import { pascalCase } from "es-toolkit";
|
|
17
17
|
import { LanguageString, decodeMultibase } from "@fedify/vocab-runtime";
|
|
18
18
|
import { fileURLToPath } from "node:url";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default, lookupWebFinger } from "./lookup-
|
|
6
|
-
import { Object as Object$1, getTypeId } from "./actor-
|
|
5
|
+
import { deno_default, lookupWebFinger } from "./lookup-C0-b_tpL.js";
|
|
6
|
+
import { Object as Object$1, getTypeId } from "./actor-Dgz9qUlS.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
|
6
|
-
const require_lookup = require('./lookup-
|
|
7
|
-
const require_actor = require('./actor-
|
|
6
|
+
const require_lookup = require('./lookup-DQJHvSnn.cjs');
|
|
7
|
+
const require_actor = require('./actor-CPm0e4b4.cjs');
|
|
8
8
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
9
9
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
10
10
|
const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
|
|
@@ -3,30 +3,30 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Image, Link, Person } from "../lookup-
|
|
6
|
+
import { Image, Link, Person } from "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
-
import { createFederation, handleWebFinger } from "../middleware-
|
|
11
|
+
import { createFederation, handleWebFinger } from "../middleware-Xxu6td_B.js";
|
|
12
12
|
import "../client-pY7-3icS.js";
|
|
13
13
|
import "../types-C2XVl6gj.js";
|
|
14
|
-
import "../actor-
|
|
15
|
-
import "../key-
|
|
16
|
-
import "../http-
|
|
17
|
-
import "../ld-
|
|
18
|
-
import "../owner-
|
|
19
|
-
import "../proof-
|
|
20
|
-
import "../docloader-
|
|
14
|
+
import "../actor-BEbHmVVz.js";
|
|
15
|
+
import "../key-D3pcXGDF.js";
|
|
16
|
+
import "../http-C3d93Ppm.js";
|
|
17
|
+
import "../ld-s9Dt9hRn.js";
|
|
18
|
+
import "../owner-e9TTGL6p.js";
|
|
19
|
+
import "../proof-1TgWOPoC.js";
|
|
20
|
+
import "../docloader-BDQQHjqx.js";
|
|
21
21
|
import "../kv-cache-DN9pfMBe.js";
|
|
22
|
-
import "../inbox-
|
|
23
|
-
import "../builder-
|
|
22
|
+
import "../inbox-CHi6jvdV.js";
|
|
23
|
+
import "../builder-BVYoJn2C.js";
|
|
24
24
|
import "../collection-BzWsN9pB.js";
|
|
25
|
-
import "../keycache-
|
|
25
|
+
import "../keycache-BipmycDZ.js";
|
|
26
26
|
import "../negotiation-C4nFufNk.js";
|
|
27
27
|
import "../retry-CfF8Gn4d.js";
|
|
28
|
-
import "../send-
|
|
29
|
-
import { createRequestContext, test } from "../testing-
|
|
28
|
+
import "../send-B9S2n1JD.js";
|
|
29
|
+
import { createRequestContext, test } from "../testing-DKC0yIkd.js";
|
|
30
30
|
import "../std__assert-DWivtrGR.js";
|
|
31
31
|
import "../assert_rejects-Ce45JcFg.js";
|
|
32
32
|
import "../assert_throws-BNXdRGWP.js";
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { lookupWebFinger } from "../lookup-
|
|
6
|
+
import { lookupWebFinger } from "../lookup-CUKd_qC3.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { test } from "../testing-
|
|
10
|
+
import { test } from "../testing-DKC0yIkd.js";
|
|
11
11
|
import "../std__assert-DWivtrGR.js";
|
|
12
12
|
import "../assert_rejects-Ce45JcFg.js";
|
|
13
13
|
import "../assert_throws-BNXdRGWP.js";
|
|
14
14
|
import "../assert_not_equals-C80BG-_5.js";
|
|
15
|
-
import { esm_default } from "../esm-
|
|
15
|
+
import { esm_default } from "../esm-VtMSTJME.js";
|
|
16
16
|
import { withTimeout } from "es-toolkit";
|
|
17
17
|
|
|
18
18
|
//#region src/webfinger/lookup.test.ts
|
package/dist/webfinger/mod.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
|
-
const require_lookup = require('../lookup-
|
|
5
|
+
const require_lookup = require('../lookup-DQJHvSnn.cjs');
|
|
6
6
|
require('../webfinger-vAtLmxOF.cjs');
|
|
7
7
|
|
|
8
8
|
exports.lookupWebFinger = require_lookup.lookupWebFinger;
|
package/dist/webfinger/mod.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { lookupWebFinger } from "../lookup-
|
|
5
|
+
import { lookupWebFinger } from "../lookup-C0-b_tpL.js";
|
|
6
6
|
import "../webfinger-C72Y8lrh.js";
|
|
7
7
|
|
|
8
8
|
export { lookupWebFinger };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/fedify",
|
|
3
|
-
"version": "2.0.0-pr.
|
|
3
|
+
"version": "2.0.0-pr.478.1911+274b5e71",
|
|
4
4
|
"description": "An ActivityPub server framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ActivityPub",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"uri-template-router": "^1.0.0",
|
|
137
137
|
"url-template": "^3.1.1",
|
|
138
138
|
"urlpattern-polyfill": "^10.1.0",
|
|
139
|
-
"@fedify/vocab-runtime": "2.0.0-pr.
|
|
139
|
+
"@fedify/vocab-runtime": "2.0.0-pr.478.1911+274b5e71"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
142
|
"@std/assert": "npm:@jsr/std__assert@^0.226.0",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"tsx": "^4.19.4",
|
|
152
152
|
"typescript": "^5.9.3",
|
|
153
153
|
"wrangler": "^4.17.0",
|
|
154
|
-
"@fedify/vocab-tools": "^2.0.0-pr.
|
|
154
|
+
"@fedify/vocab-tools": "^2.0.0-pr.478.1911+274b5e71"
|
|
155
155
|
},
|
|
156
156
|
"scripts": {
|
|
157
157
|
"build": "deno task codegen && pnpm run --filter vocab-runtime build && pnpm run --filter vocab-tools build && tsdown",
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
globalThis.addEventListener = () => {};
|
|
5
|
-
|
|
6
|
-
import { Create, Note, Person } from "../lookup-CjRKAy5i.js";
|
|
7
|
-
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
-
import "../assert-MZs1qjMx.js";
|
|
9
|
-
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
-
import { createFederation, handleInbox } from "../middleware-BCCuNXoU.js";
|
|
12
|
-
import "../client-pY7-3icS.js";
|
|
13
|
-
import "../types-C2XVl6gj.js";
|
|
14
|
-
import "../actor-DM_mczcz.js";
|
|
15
|
-
import "../key-Bm6xoWJ9.js";
|
|
16
|
-
import { signRequest } from "../http-CNbh6Bgj.js";
|
|
17
|
-
import "../ld-CFrblqOy.js";
|
|
18
|
-
import "../owner-8cgMngcR.js";
|
|
19
|
-
import "../proof-BbhNICOW.js";
|
|
20
|
-
import "../docloader-DPQnUMPZ.js";
|
|
21
|
-
import "../kv-cache-DN9pfMBe.js";
|
|
22
|
-
import "../inbox-CKpjNIIw.js";
|
|
23
|
-
import "../builder-CpW45hts.js";
|
|
24
|
-
import "../collection-BzWsN9pB.js";
|
|
25
|
-
import "../keycache-BoIUmk-X.js";
|
|
26
|
-
import "../negotiation-C4nFufNk.js";
|
|
27
|
-
import "../retry-CfF8Gn4d.js";
|
|
28
|
-
import "../send-zlaQ6fqY.js";
|
|
29
|
-
import { createInboxContext, createRequestContext, mockDocumentLoader, test } from "../testing-DHsP4t6k.js";
|
|
30
|
-
import "../std__assert-DWivtrGR.js";
|
|
31
|
-
import "../assert_rejects-Ce45JcFg.js";
|
|
32
|
-
import "../assert_throws-BNXdRGWP.js";
|
|
33
|
-
import "../assert_not_equals-C80BG-_5.js";
|
|
34
|
-
import { rsaPrivateKey3, rsaPublicKey3 } from "../keys-BJSEmAMh.js";
|
|
35
|
-
|
|
36
|
-
//#region src/federation/handler_requirehttpsig.test.ts
|
|
37
|
-
test("handleInbox() with requireHttpSignature option", async () => {
|
|
38
|
-
const activity = new Create({
|
|
39
|
-
id: new URL("https://example.com/activities/1"),
|
|
40
|
-
actor: new URL("https://example.com/person2"),
|
|
41
|
-
object: new Note({
|
|
42
|
-
id: new URL("https://example.com/notes/1"),
|
|
43
|
-
attribution: new URL("https://example.com/person2"),
|
|
44
|
-
content: "Hello, world!"
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
const unsignedRequest = new Request("https://example.com/inbox", {
|
|
48
|
-
method: "POST",
|
|
49
|
-
headers: { "Content-Type": "application/activity+json" },
|
|
50
|
-
body: JSON.stringify(await activity.toJsonLd())
|
|
51
|
-
});
|
|
52
|
-
const federation = createFederation({ kv: new MemoryKvStore() });
|
|
53
|
-
const unsignedContext = createRequestContext({
|
|
54
|
-
federation,
|
|
55
|
-
request: unsignedRequest,
|
|
56
|
-
url: new URL(unsignedRequest.url),
|
|
57
|
-
data: void 0
|
|
58
|
-
});
|
|
59
|
-
const actorDispatcher = (_ctx, identifier) => {
|
|
60
|
-
if (identifier !== "testuser") return null;
|
|
61
|
-
return new Person({ name: "Test User" });
|
|
62
|
-
};
|
|
63
|
-
const onNotFound = () => new Response("Not found", { status: 404 });
|
|
64
|
-
const baseInboxOptions = {
|
|
65
|
-
kv: new MemoryKvStore(),
|
|
66
|
-
kvPrefixes: {
|
|
67
|
-
activityIdempotence: ["_fedify", "activityIdempotence"],
|
|
68
|
-
publicKey: ["_fedify", "publicKey"]
|
|
69
|
-
},
|
|
70
|
-
actorDispatcher,
|
|
71
|
-
onNotFound,
|
|
72
|
-
signatureTimeWindow: { minutes: 5 },
|
|
73
|
-
skipSignatureVerification: false
|
|
74
|
-
};
|
|
75
|
-
let response = await handleInbox(unsignedRequest, {
|
|
76
|
-
recipient: null,
|
|
77
|
-
context: unsignedContext,
|
|
78
|
-
inboxContextFactory(_activity) {
|
|
79
|
-
return createInboxContext({
|
|
80
|
-
...unsignedContext,
|
|
81
|
-
clone: void 0
|
|
82
|
-
});
|
|
83
|
-
},
|
|
84
|
-
...baseInboxOptions,
|
|
85
|
-
requireHttpSignature: false
|
|
86
|
-
});
|
|
87
|
-
assertEquals(response.status, 401, "Without HTTP Sig and no LD Sig/OIP, should return 401");
|
|
88
|
-
response = await handleInbox(unsignedRequest.clone(), {
|
|
89
|
-
recipient: null,
|
|
90
|
-
context: unsignedContext,
|
|
91
|
-
inboxContextFactory(_activity) {
|
|
92
|
-
return createInboxContext({
|
|
93
|
-
...unsignedContext,
|
|
94
|
-
clone: void 0
|
|
95
|
-
});
|
|
96
|
-
},
|
|
97
|
-
...baseInboxOptions,
|
|
98
|
-
requireHttpSignature: true
|
|
99
|
-
});
|
|
100
|
-
assertEquals(response.status, 401, "With requireHttpSignature: true and no HTTP Sig, should return 401");
|
|
101
|
-
const signedRequest = await signRequest(unsignedRequest.clone(), rsaPrivateKey3, rsaPublicKey3.id);
|
|
102
|
-
const signedContext = createRequestContext({
|
|
103
|
-
federation,
|
|
104
|
-
request: signedRequest,
|
|
105
|
-
url: new URL(signedRequest.url),
|
|
106
|
-
data: void 0,
|
|
107
|
-
documentLoader: mockDocumentLoader
|
|
108
|
-
});
|
|
109
|
-
response = await handleInbox(signedRequest, {
|
|
110
|
-
recipient: null,
|
|
111
|
-
context: signedContext,
|
|
112
|
-
inboxContextFactory(_activity) {
|
|
113
|
-
return createInboxContext({
|
|
114
|
-
...signedContext,
|
|
115
|
-
clone: void 0
|
|
116
|
-
});
|
|
117
|
-
},
|
|
118
|
-
...baseInboxOptions,
|
|
119
|
-
requireHttpSignature: true
|
|
120
|
-
});
|
|
121
|
-
assertEquals(response.status, 202, "With requireHttpSignature: true and valid HTTP Sig, should succeed");
|
|
122
|
-
response = await handleInbox(unsignedRequest.clone(), {
|
|
123
|
-
recipient: null,
|
|
124
|
-
context: unsignedContext,
|
|
125
|
-
inboxContextFactory(_activity) {
|
|
126
|
-
return createInboxContext({
|
|
127
|
-
...unsignedContext,
|
|
128
|
-
clone: void 0
|
|
129
|
-
});
|
|
130
|
-
},
|
|
131
|
-
...baseInboxOptions,
|
|
132
|
-
skipSignatureVerification: true,
|
|
133
|
-
requireHttpSignature: true
|
|
134
|
-
});
|
|
135
|
-
assertEquals(response.status, 202, "With skipSignatureVerification: true, should succeed even if requireHttpSignature: true");
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
//#endregion
|