@fedify/fedify 2.5.0-dev.2844 → 2.5.0-dev.2860
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/{client-3InDZbba.d.cts → client-DLHsPY7X.d.cts} +16 -0
- package/dist/{client-3InDZbba.d.ts → client-DLHsPY7X.d.ts} +16 -0
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/mod.js +1 -1
- package/dist/{context-ZtE85CT_.d.cts → context-BhEcRbHo.d.cts} +32 -15
- package/dist/{context-CgIOZfHW.d.ts → context-C96-nSuT.d.ts} +32 -15
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/{federation-BQI281O9.cjs → federation-Auvn2nQS.cjs} +525 -196
- package/dist/{http-wTHjiJ6Q.js → http-BN8Zo-nG.js} +2639 -2464
- package/dist/{http-C0rce83B.cjs → http-DcmM0AwN.cjs} +2643 -2456
- package/dist/{key-BZw-YiK5.d.ts → key-2YNB5dUS.d.cts} +5 -5
- package/dist/{key-D5fbQkKM.d.cts → key-BV9DK4qb.d.ts} +5 -5
- package/dist/{kv-cache-DflBc0cC.cjs → kv-cache-DRJgdRR0.cjs} +1 -1
- package/dist/{kv-cache-O6fntSzA.js → kv-cache-Dz6xiM-c.js} +1 -1
- package/dist/{ld-DlC78ioJ.d.ts → ld-BKOmKbuX.d.cts} +28 -6
- package/dist/{ld-DEi9ERHf.d.cts → ld-BewN9CW6.d.ts} +28 -6
- package/dist/{middleware-B8hzxJNs.js → middleware-kGZB_Ab7.js} +457 -129
- package/dist/{mod-rDDnkuR8.d.cts → mod-B9UuZYxK.d.cts} +3 -3
- package/dist/{mod-BD6xjFNY.d.ts → mod-BMHC9eZs.d.ts} +1 -1
- package/dist/{mod-Bl1EEZMj.d.cts → mod-CUXI3ede.d.cts} +1 -1
- package/dist/{mod-SgCN1wPF.d.ts → mod-DHjHSPnw.d.ts} +3 -3
- package/dist/{mod-BamwZjJx.d.cts → mod-iIOirIJV.d.ts} +3 -3
- package/dist/{mod-BJRtsw7l.d.ts → mod-oIp2uo8F.d.cts} +3 -3
- package/dist/mod.cjs +6 -6
- package/dist/mod.d.cts +9 -9
- package/dist/mod.d.ts +9 -9
- package/dist/mod.js +6 -6
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.d.cts +1 -1
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/{portable-collection-DbqytYWl.js → portable-collection-BKIPytM_.js} +3 -2
- package/dist/{portable-collection-zcu-7ozm.cjs → portable-collection-C5sRy1VN.cjs} +3 -2
- package/dist/portable-verifier-CPA86vIP.js +22 -0
- package/dist/portable-verifier-DiLU8c9T.cjs +26 -0
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +4 -4
- package/dist/sig/mod.d.ts +4 -4
- package/dist/sig/mod.js +2 -2
- package/dist/{transformers-DAtXl_Kc.js → transformers-BlJ53iKs.js} +3 -2
- package/dist/{transformers-BalCrSsr.cjs → transformers-aIK89ibB.cjs} +3 -2
- package/dist/{types-DUjZb4i6.js → types-BbCbtwZp.js} +86 -11
- package/dist/{types-hKCCjii0.cjs → types-C8gac_AD.cjs} +85 -10
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { DocumentLoader, PortableObjectVerifier } from "@fedify/vocab-runtime";
|
|
3
2
|
import { Actor, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
3
|
+
import { CryptoKeyLike, DocumentLoader, PortableObjectVerifier } from "@fedify/vocab-runtime";
|
|
4
4
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
//#region src/sig/proof.d.ts
|
|
6
6
|
/**
|
|
@@ -40,7 +40,7 @@ interface CreateProofOptions {
|
|
|
40
40
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
41
41
|
* @since 0.10.0
|
|
42
42
|
*/
|
|
43
|
-
declare function createProof(object: Object$1, privateKey:
|
|
43
|
+
declare function createProof(object: Object$1, privateKey: CryptoKeyLike, keyId: URL, options?: CreateProofOptions): Promise<DataIntegrityProof>;
|
|
44
44
|
/**
|
|
45
45
|
* Options for {@link signObject}.
|
|
46
46
|
* @since 0.10.0
|
|
@@ -67,7 +67,7 @@ interface SignObjectOptions extends CreateProofOptions {
|
|
|
67
67
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
68
68
|
* @since 0.10.0
|
|
69
69
|
*/
|
|
70
|
-
declare function signObject<T extends Object$1>(object: T, privateKey:
|
|
70
|
+
declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKeyLike, keyId: URL, options?: SignObjectOptions): Promise<T>;
|
|
71
71
|
/**
|
|
72
72
|
* Options for {@link verifyProof}.
|
|
73
73
|
* @since 0.10.0
|
|
@@ -552,7 +552,7 @@ interface Rfc9421SignRequestOptions {
|
|
|
552
552
|
* @returns The signed request.
|
|
553
553
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
554
554
|
*/
|
|
555
|
-
declare function signRequest(request: Request, privateKey:
|
|
555
|
+
declare function signRequest(request: Request, privateKey: CryptoKeyLike, keyId: URL, options?: SignRequestOptions): Promise<Request>;
|
|
556
556
|
/**
|
|
557
557
|
* Options for {@link verifyRequest}.
|
|
558
558
|
*/
|
|
@@ -905,7 +905,7 @@ declare function generateCryptoKeyPair(algorithm?: "RSASSA-PKCS1-v1_5" | "Ed2551
|
|
|
905
905
|
* serialization and storage.
|
|
906
906
|
* @throws {TypeError} If the key is invalid or unsupported.
|
|
907
907
|
*/
|
|
908
|
-
declare function exportJwk(key:
|
|
908
|
+
declare function exportJwk(key: CryptoKeyLike): Promise<JsonWebKey>;
|
|
909
909
|
/**
|
|
910
910
|
* Imports a key from JWK format.
|
|
911
911
|
* @param jwk The key in JWK format.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
+
import { CryptoKeyLike, DocumentLoader, PortableObjectVerifier } from "@fedify/vocab-runtime";
|
|
2
3
|
import { Actor, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
3
|
-
import { DocumentLoader, PortableObjectVerifier } from "@fedify/vocab-runtime";
|
|
4
4
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
//#region src/sig/proof.d.ts
|
|
6
6
|
/**
|
|
@@ -40,7 +40,7 @@ interface CreateProofOptions {
|
|
|
40
40
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
41
41
|
* @since 0.10.0
|
|
42
42
|
*/
|
|
43
|
-
declare function createProof(object: Object$1, privateKey:
|
|
43
|
+
declare function createProof(object: Object$1, privateKey: CryptoKeyLike, keyId: URL, options?: CreateProofOptions): Promise<DataIntegrityProof>;
|
|
44
44
|
/**
|
|
45
45
|
* Options for {@link signObject}.
|
|
46
46
|
* @since 0.10.0
|
|
@@ -67,7 +67,7 @@ interface SignObjectOptions extends CreateProofOptions {
|
|
|
67
67
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
68
68
|
* @since 0.10.0
|
|
69
69
|
*/
|
|
70
|
-
declare function signObject<T extends Object$1>(object: T, privateKey:
|
|
70
|
+
declare function signObject<T extends Object$1>(object: T, privateKey: CryptoKeyLike, keyId: URL, options?: SignObjectOptions): Promise<T>;
|
|
71
71
|
/**
|
|
72
72
|
* Options for {@link verifyProof}.
|
|
73
73
|
* @since 0.10.0
|
|
@@ -552,7 +552,7 @@ interface Rfc9421SignRequestOptions {
|
|
|
552
552
|
* @returns The signed request.
|
|
553
553
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
554
554
|
*/
|
|
555
|
-
declare function signRequest(request: Request, privateKey:
|
|
555
|
+
declare function signRequest(request: Request, privateKey: CryptoKeyLike, keyId: URL, options?: SignRequestOptions): Promise<Request>;
|
|
556
556
|
/**
|
|
557
557
|
* Options for {@link verifyRequest}.
|
|
558
558
|
*/
|
|
@@ -905,7 +905,7 @@ declare function generateCryptoKeyPair(algorithm?: "RSASSA-PKCS1-v1_5" | "Ed2551
|
|
|
905
905
|
* serialization and storage.
|
|
906
906
|
* @throws {TypeError} If the key is invalid or unsupported.
|
|
907
907
|
*/
|
|
908
|
-
declare function exportJwk(key:
|
|
908
|
+
declare function exportJwk(key: CryptoKeyLike): Promise<JsonWebKey>;
|
|
909
909
|
/**
|
|
910
910
|
* Imports a key from JWK format.
|
|
911
911
|
* @param jwk The key in JWK format.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
|
-
const require_http = require("./http-
|
|
2
|
+
const require_http = require("./http-DcmM0AwN.cjs");
|
|
3
3
|
let _logtape_logtape = require("@logtape/logtape");
|
|
4
4
|
let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
|
|
5
5
|
let es_toolkit = require("es-toolkit");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { X as validateCryptoKey, dt as recordDocumentCache, t as doubleKnockScoped } from "./http-
|
|
3
|
+
import { X as validateCryptoKey, dt as recordDocumentCache, t as doubleKnockScoped } from "./http-BN8Zo-nG.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, resolveDocumentLoaderTimeout, withDocumentLoaderTimeout } from "@fedify/vocab-runtime";
|
|
6
6
|
import { curry } from "es-toolkit";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { a as KeyCache, v as VerificationObservationOptions } from "./key-
|
|
3
|
-
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
2
|
+
import { a as KeyCache, v as VerificationObservationOptions } from "./key-2YNB5dUS.cjs";
|
|
4
3
|
import { Activity, Actor, CryptographicKey } from "@fedify/vocab";
|
|
4
|
+
import { CryptoKeyLike, DocumentLoader } from "@fedify/vocab-runtime";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
7
|
//#region src/sig/owner.d.ts
|
|
@@ -88,7 +88,7 @@ type EffectiveContextLoaderPolicy = "standard" | "normalization";
|
|
|
88
88
|
* @since 1.0.0
|
|
89
89
|
*/
|
|
90
90
|
interface Signature {
|
|
91
|
-
"@context"?: "https://w3id.org/identity/v1";
|
|
91
|
+
"@context"?: "https://w3id.org/identity/v1" | "https://w3id.org/security/v1";
|
|
92
92
|
type: "RsaSignature2017";
|
|
93
93
|
id?: string;
|
|
94
94
|
creator: string;
|
|
@@ -97,16 +97,26 @@ interface Signature {
|
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Attaches a LD signature to the given JSON-LD document.
|
|
100
|
+
*
|
|
101
|
+
* When the document's context does not already define the `signature`
|
|
102
|
+
* property, the returned document adds a minimal inline context for it.
|
|
103
|
+
* Without that definition, expanding the attached signature would produce a
|
|
104
|
+
* blank node predicate, which is not valid RDF. Documents that already carry
|
|
105
|
+
* a `proof` are left unchanged, since a new context definition would invalidate
|
|
106
|
+
* the proof. Documents whose context includes an unrecognized remote context
|
|
107
|
+
* are also left unchanged, since that context may already define `signature`.
|
|
100
108
|
* @param jsonLd The JSON-LD document to attach the signature to. It is not
|
|
101
109
|
* modified.
|
|
102
110
|
* @param signature The signature to attach.
|
|
103
111
|
* @returns The JSON-LD document with the attached signature.
|
|
104
112
|
* @throws {TypeError} If the input document is not a valid JSON-LD document.
|
|
113
|
+
* Top-level arrays are rejected, since a Linked Data
|
|
114
|
+
* Signature is attached to a single node.
|
|
105
115
|
* @since 1.0.0
|
|
106
116
|
*/
|
|
107
117
|
declare function attachSignature(jsonLd: unknown, signature: Signature): {
|
|
108
118
|
signature: Signature;
|
|
109
|
-
}
|
|
119
|
+
} & Record<string, unknown>;
|
|
110
120
|
/**
|
|
111
121
|
* Options for creating Linked Data Signatures.
|
|
112
122
|
* @since 1.0.0
|
|
@@ -124,6 +134,12 @@ interface CreateSignatureOptions {
|
|
|
124
134
|
}
|
|
125
135
|
/**
|
|
126
136
|
* Creates a LD signature for the given JSON-LD document.
|
|
137
|
+
*
|
|
138
|
+
* If the document's context does not define the `signature` property, the
|
|
139
|
+
* signature is computed over the document with a minimal inline definition
|
|
140
|
+
* added. Use {@link attachSignature} to attach the signature to that exact
|
|
141
|
+
* document. Documents that already carry a `proof`, or whose context includes
|
|
142
|
+
* an unrecognized remote context, are hashed unchanged.
|
|
127
143
|
* @param jsonLd The JSON-LD document to sign.
|
|
128
144
|
* @param privateKey The private key to sign the document.
|
|
129
145
|
* @param keyId The ID of the public key that corresponds to the private key.
|
|
@@ -133,7 +149,7 @@ interface CreateSignatureOptions {
|
|
|
133
149
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
134
150
|
* @since 1.0.0
|
|
135
151
|
*/
|
|
136
|
-
declare function createSignature(jsonLd: unknown, privateKey:
|
|
152
|
+
declare function createSignature(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, {
|
|
137
153
|
contextLoader,
|
|
138
154
|
created
|
|
139
155
|
}?: CreateSignatureOptions): Promise<Signature>;
|
|
@@ -162,7 +178,7 @@ interface SignJsonLdOptions extends CreateSignatureOptions {
|
|
|
162
178
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
163
179
|
* @since 1.0.0
|
|
164
180
|
*/
|
|
165
|
-
declare function signJsonLd(jsonLd: unknown, privateKey:
|
|
181
|
+
declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, options: SignJsonLdOptions): Promise<{
|
|
166
182
|
signature: Signature;
|
|
167
183
|
}>;
|
|
168
184
|
/**
|
|
@@ -225,6 +241,10 @@ interface VerifySignatureOptions extends VerificationObservationOptions {
|
|
|
225
241
|
* `activitypub.signature.key_fetch.duration`, since the rest of the work
|
|
226
242
|
* that the verification-duration metric is meant to cover happens in
|
|
227
243
|
* `verifyJsonLd`.
|
|
244
|
+
*
|
|
245
|
+
* Unmapped properties discarded during JSON-LD processing are tolerated, but
|
|
246
|
+
* their values are not authenticated by the signature. Other unsafe
|
|
247
|
+
* canonicalization warnings, including relative IRIs, remain rejected.
|
|
228
248
|
* @param jsonLd The JSON-LD document to verify.
|
|
229
249
|
* @param options Options for verifying the signature.
|
|
230
250
|
* @returns The public key that signed the document or `null` if the signature
|
|
@@ -241,6 +261,8 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
|
|
|
241
261
|
* Signatures. If the document is signed, this function verifies the signature
|
|
242
262
|
* and checks if the document is attributed to the owner of the public key.
|
|
243
263
|
* If the document is not signed, this function returns `false`.
|
|
264
|
+
* Unmapped properties discarded during JSON-LD processing are not
|
|
265
|
+
* authenticated, even when verification succeeds.
|
|
244
266
|
* @param jsonLd The JSON-LD document to verify.
|
|
245
267
|
* @param options Options for verifying the document.
|
|
246
268
|
* @returns `true` if the document is authentic; `false` otherwise.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { a as KeyCache, v as VerificationObservationOptions } from "./key-
|
|
2
|
+
import { a as KeyCache, v as VerificationObservationOptions } from "./key-BV9DK4qb.js";
|
|
3
|
+
import { CryptoKeyLike, DocumentLoader } from "@fedify/vocab-runtime";
|
|
3
4
|
import { Activity, Actor, CryptographicKey } from "@fedify/vocab";
|
|
4
|
-
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
7
|
//#region src/sig/owner.d.ts
|
|
@@ -88,7 +88,7 @@ type EffectiveContextLoaderPolicy = "standard" | "normalization";
|
|
|
88
88
|
* @since 1.0.0
|
|
89
89
|
*/
|
|
90
90
|
interface Signature {
|
|
91
|
-
"@context"?: "https://w3id.org/identity/v1";
|
|
91
|
+
"@context"?: "https://w3id.org/identity/v1" | "https://w3id.org/security/v1";
|
|
92
92
|
type: "RsaSignature2017";
|
|
93
93
|
id?: string;
|
|
94
94
|
creator: string;
|
|
@@ -97,16 +97,26 @@ interface Signature {
|
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Attaches a LD signature to the given JSON-LD document.
|
|
100
|
+
*
|
|
101
|
+
* When the document's context does not already define the `signature`
|
|
102
|
+
* property, the returned document adds a minimal inline context for it.
|
|
103
|
+
* Without that definition, expanding the attached signature would produce a
|
|
104
|
+
* blank node predicate, which is not valid RDF. Documents that already carry
|
|
105
|
+
* a `proof` are left unchanged, since a new context definition would invalidate
|
|
106
|
+
* the proof. Documents whose context includes an unrecognized remote context
|
|
107
|
+
* are also left unchanged, since that context may already define `signature`.
|
|
100
108
|
* @param jsonLd The JSON-LD document to attach the signature to. It is not
|
|
101
109
|
* modified.
|
|
102
110
|
* @param signature The signature to attach.
|
|
103
111
|
* @returns The JSON-LD document with the attached signature.
|
|
104
112
|
* @throws {TypeError} If the input document is not a valid JSON-LD document.
|
|
113
|
+
* Top-level arrays are rejected, since a Linked Data
|
|
114
|
+
* Signature is attached to a single node.
|
|
105
115
|
* @since 1.0.0
|
|
106
116
|
*/
|
|
107
117
|
declare function attachSignature(jsonLd: unknown, signature: Signature): {
|
|
108
118
|
signature: Signature;
|
|
109
|
-
}
|
|
119
|
+
} & Record<string, unknown>;
|
|
110
120
|
/**
|
|
111
121
|
* Options for creating Linked Data Signatures.
|
|
112
122
|
* @since 1.0.0
|
|
@@ -124,6 +134,12 @@ interface CreateSignatureOptions {
|
|
|
124
134
|
}
|
|
125
135
|
/**
|
|
126
136
|
* Creates a LD signature for the given JSON-LD document.
|
|
137
|
+
*
|
|
138
|
+
* If the document's context does not define the `signature` property, the
|
|
139
|
+
* signature is computed over the document with a minimal inline definition
|
|
140
|
+
* added. Use {@link attachSignature} to attach the signature to that exact
|
|
141
|
+
* document. Documents that already carry a `proof`, or whose context includes
|
|
142
|
+
* an unrecognized remote context, are hashed unchanged.
|
|
127
143
|
* @param jsonLd The JSON-LD document to sign.
|
|
128
144
|
* @param privateKey The private key to sign the document.
|
|
129
145
|
* @param keyId The ID of the public key that corresponds to the private key.
|
|
@@ -133,7 +149,7 @@ interface CreateSignatureOptions {
|
|
|
133
149
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
134
150
|
* @since 1.0.0
|
|
135
151
|
*/
|
|
136
|
-
declare function createSignature(jsonLd: unknown, privateKey:
|
|
152
|
+
declare function createSignature(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, {
|
|
137
153
|
contextLoader,
|
|
138
154
|
created
|
|
139
155
|
}?: CreateSignatureOptions): Promise<Signature>;
|
|
@@ -162,7 +178,7 @@ interface SignJsonLdOptions extends CreateSignatureOptions {
|
|
|
162
178
|
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
163
179
|
* @since 1.0.0
|
|
164
180
|
*/
|
|
165
|
-
declare function signJsonLd(jsonLd: unknown, privateKey:
|
|
181
|
+
declare function signJsonLd(jsonLd: unknown, privateKey: CryptoKeyLike, keyId: URL, options: SignJsonLdOptions): Promise<{
|
|
166
182
|
signature: Signature;
|
|
167
183
|
}>;
|
|
168
184
|
/**
|
|
@@ -225,6 +241,10 @@ interface VerifySignatureOptions extends VerificationObservationOptions {
|
|
|
225
241
|
* `activitypub.signature.key_fetch.duration`, since the rest of the work
|
|
226
242
|
* that the verification-duration metric is meant to cover happens in
|
|
227
243
|
* `verifyJsonLd`.
|
|
244
|
+
*
|
|
245
|
+
* Unmapped properties discarded during JSON-LD processing are tolerated, but
|
|
246
|
+
* their values are not authenticated by the signature. Other unsafe
|
|
247
|
+
* canonicalization warnings, including relative IRIs, remain rejected.
|
|
228
248
|
* @param jsonLd The JSON-LD document to verify.
|
|
229
249
|
* @param options Options for verifying the signature.
|
|
230
250
|
* @returns The public key that signed the document or `null` if the signature
|
|
@@ -241,6 +261,8 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
|
|
|
241
261
|
* Signatures. If the document is signed, this function verifies the signature
|
|
242
262
|
* and checks if the document is attributed to the owner of the public key.
|
|
243
263
|
* If the document is not signed, this function returns `false`.
|
|
264
|
+
* Unmapped properties discarded during JSON-LD processing are not
|
|
265
|
+
* authenticated, even when verification succeeds.
|
|
244
266
|
* @param jsonLd The JSON-LD document to verify.
|
|
245
267
|
* @param options Options for verifying the document.
|
|
246
268
|
* @returns `true` if the document is authentic; `false` otherwise.
|