@sphereon/ssi-sdk-ext.jwt-service 0.24.1-unstable.85 → 0.24.1-unstable.88
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/functions/index.d.ts.map +1 -1
- package/dist/functions/index.js +1 -2
- package/dist/functions/index.js.map +1 -1
- package/dist/types/IJwtService.d.ts +1 -2
- package/dist/types/IJwtService.d.ts.map +1 -1
- package/dist/types/IJwtService.js.map +1 -1
- package/package.json +10 -10
- package/plugin.schema.json +472 -153
- package/src/functions/index.ts +2 -3
- package/src/types/IJwtService.ts +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,uBAAuB,EAC1B,MAAM,6CAA6C,CAAA;AAGpD,OAAO,EACH,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,cAAc,EAEd,SAAS,EACT,iBAAiB,EACpB,MAAM,sBAAsB,CAAA;AAE7B,eAAO,MAAM,gBAAgB,SAAgB,iBAAiB,gCAA8B,QAAQ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,uBAAuB,EAC1B,MAAM,6CAA6C,CAAA;AAGpD,OAAO,EACH,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,cAAc,EAEd,SAAS,EACT,iBAAiB,EACpB,MAAM,sBAAsB,CAAA;AAE7B,eAAO,MAAM,gBAAgB,SAAgB,iBAAiB,gCAA8B,QAAQ,iBAAiB,CA0CpH,CAAA;AAED,eAAO,MAAM,gBAAgB,SAAgB,oBAAoB,gCAA8B,QAAQ,UAAU,CAGhH,CAAA;AAED,eAAO,MAAM,sBAAsB,SAAgB,sBAAsB,gCAA8B,QAAQ,gBAAgB,CAS9H,CAAA;AAED,eAAO,MAAM,oBAAoB,SAAgB,iBAAiB,gCAA8B,QAAQ,cAAc,CA4BrH,CAAA;AAED;;;;;;;GAOG;AAEH,eAAO,MAAM,uBAAuB,uDAM7B;IACC,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,UAAU,EAAE,uBAAuB,CAAA;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,MAAM,EAAE,SAAS,CAAA;CACpB,kDAsBJ,CAAA"}
|
package/dist/functions/index.js
CHANGED
|
@@ -43,7 +43,7 @@ const prepareJwsObject = (args, context) => __awaiter(void 0, void 0, void 0, fu
|
|
|
43
43
|
if (!combinedHeader.alg) {
|
|
44
44
|
return Promise.reject(`No 'alg' key present in the JWS header`);
|
|
45
45
|
}
|
|
46
|
-
const identifier = yield
|
|
46
|
+
const identifier = yield (0, ssi_sdk_ext_identifier_resolution_1.ensureManagedIdentifierResult)(issuer, context);
|
|
47
47
|
yield (0, exports.checkAndUpdateJwtHeader)({ mode, identifier, noIdentifierInHeader, header: protectedHeader }, context);
|
|
48
48
|
const isBytes = payload instanceof Uint8Array;
|
|
49
49
|
const isString = typeof payload === 'string';
|
|
@@ -66,7 +66,6 @@ const prepareJwsObject = (args, context) => __awaiter(void 0, void 0, void 0, fu
|
|
|
66
66
|
protectedHeader: base64urlHeader,
|
|
67
67
|
payload: base64urlPayload,
|
|
68
68
|
},
|
|
69
|
-
issuer,
|
|
70
69
|
identifier,
|
|
71
70
|
};
|
|
72
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mGAKoD;AACpD,yCAA8D;AAC9D,iDAAkC;AAe3B,MAAM,gBAAgB,GAAG,CAAO,IAAuB,EAAE,OAA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IAAI,SAAS,KAAK,KAAK,CAAC,EAAE,CAAC;QACxD,mGAAmG;QACnG,4GAA4G;QAC5G,OAAO,IAAI,CAAA;IACf,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACrB,IAAI,SAAS,KAAK,MAAM,IAAI,IAAI,KAAK,gBAAgB,EAAE,CAAC;YACpD,MAAM,KAAK,CAAC,iBAAiB,IAAI,qCAAqC,gBAAgB,EAAE,CAAC,CAAA;QAC7F,CAAC;QACD,OAAO,IAAI,CAAA;IACf,CAAC;IACD,mGAAmG;IACnG,OAAO,IAAI,KAAK,MAAM,IAAI,gBAAgB,KAAK,SAAS,CAAA;AAC5D,CAAC,CAAA"}
|
|
@@ -37,7 +37,6 @@ export interface PreparedJwsObject {
|
|
|
37
37
|
payload: string;
|
|
38
38
|
protectedHeader: string;
|
|
39
39
|
};
|
|
40
|
-
issuer: ManagedIdentifierOpts;
|
|
41
40
|
identifier: ManagedIdentifierResult;
|
|
42
41
|
}
|
|
43
42
|
export interface BaseJwtHeader {
|
|
@@ -69,7 +68,7 @@ export interface JwsHeaderOpts {
|
|
|
69
68
|
export type CreateJwsMode = 'x5c' | 'kid' | 'jwk' | 'did' | 'auto';
|
|
70
69
|
export type CreateJwsArgs = {
|
|
71
70
|
mode?: CreateJwsMode;
|
|
72
|
-
issuer: ManagedIdentifierOpts & {
|
|
71
|
+
issuer: (ManagedIdentifierOpts | ManagedIdentifierResult) & {
|
|
73
72
|
noIssPayloadUpdate?: boolean;
|
|
74
73
|
noIdentifierInHeader?: boolean;
|
|
75
74
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IJwtService.d.ts","sourceRoot":"","sources":["../../src/types/IJwtService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,6CAA6C,CAAA;AACpD,OAAO,EAAC,mBAAmB,EAAC,MAAM,mCAAmC,CAAA;AACrE,OAAO,EA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;IACT,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;IAEd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,qBAAqB,CAAA;CAC3B;AAED,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAA;AAElE,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,MAAM,EAAE,CAAC,qBAAqB,GAAG,uBAAuB,CAAC,GAAG;QAAE,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IAC5H,eAAe,EAAE,SAAS,CAAA;IAC1B,OAAO,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAA;AAEhD,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,CAAA;AAErF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG;IAC9C,iBAAiB,CAAC,EAAE,SAAS,CAAA;IAC7B,kBAAkB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;CAC7C,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,UAAU,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IJwtService.js","sourceRoot":"","sources":["../../src/types/IJwtService.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"IJwtService.js","sourceRoot":"","sources":["../../src/types/IJwtService.ts"],"names":[],"mappings":";;AAoHA,gGAAgG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk-ext.jwt-service",
|
|
3
|
-
"version": "0.24.1-unstable.
|
|
3
|
+
"version": "0.24.1-unstable.88+7f70f66",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"generate-plugin-schema": "sphereon dev generate-plugin-schema"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.
|
|
19
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.
|
|
20
|
-
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-unstable.
|
|
21
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.
|
|
22
|
-
"@sphereon/ssi-sdk-ext.x509-utils": "0.24.1-unstable.
|
|
18
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.24.1-unstable.88+7f70f66",
|
|
19
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.24.1-unstable.88+7f70f66",
|
|
20
|
+
"@sphereon/ssi-sdk-ext.key-manager": "0.24.1-unstable.88+7f70f66",
|
|
21
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.24.1-unstable.88+7f70f66",
|
|
22
|
+
"@sphereon/ssi-sdk-ext.x509-utils": "0.24.1-unstable.88+7f70f66",
|
|
23
23
|
"@sphereon/ssi-sdk.agent-config": "0.29.1-unstable.75",
|
|
24
24
|
"@sphereon/ssi-types": "0.29.1-unstable.75",
|
|
25
25
|
"@veramo/core": "4.2.0",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"uint8arrays": "^3.1.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.24.1-unstable.
|
|
33
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.24.1-unstable.
|
|
34
|
-
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-unstable.
|
|
32
|
+
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.24.1-unstable.88+7f70f66",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.24.1-unstable.88+7f70f66",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.kms-local": "0.24.1-unstable.88+7f70f66",
|
|
35
35
|
"@sphereon/ssi-sdk.dev": "0.29.1-unstable.75",
|
|
36
36
|
"@veramo/data-store": "4.2.0",
|
|
37
37
|
"@veramo/did-manager": "4.2.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"X.509 Certificates",
|
|
67
67
|
"ARF"
|
|
68
68
|
],
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "7f70f6609cb82dacba2db07710b62ffb3cc9a26e"
|
|
70
70
|
}
|
package/plugin.schema.json
CHANGED
|
@@ -177,6 +177,237 @@
|
|
|
177
177
|
"required": [
|
|
178
178
|
"identifier"
|
|
179
179
|
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"type": "object",
|
|
183
|
+
"properties": {
|
|
184
|
+
"noIssPayloadUpdate": {
|
|
185
|
+
"type": "boolean"
|
|
186
|
+
},
|
|
187
|
+
"noIdentifierInHeader": {
|
|
188
|
+
"type": "boolean"
|
|
189
|
+
},
|
|
190
|
+
"jwk": {
|
|
191
|
+
"$ref": "#/components/schemas/JWK"
|
|
192
|
+
},
|
|
193
|
+
"jwkThumbprint": {
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"kmsKeyRef": {
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"method": {
|
|
200
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
201
|
+
},
|
|
202
|
+
"key": {
|
|
203
|
+
"$ref": "#/components/schemas/IKey"
|
|
204
|
+
},
|
|
205
|
+
"kid": {
|
|
206
|
+
"type": "string"
|
|
207
|
+
},
|
|
208
|
+
"issuer": {
|
|
209
|
+
"type": "string"
|
|
210
|
+
},
|
|
211
|
+
"x5c": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"certificate": {}
|
|
218
|
+
},
|
|
219
|
+
"required": [
|
|
220
|
+
"certificate",
|
|
221
|
+
"jwk",
|
|
222
|
+
"jwkThumbprint",
|
|
223
|
+
"key",
|
|
224
|
+
"kmsKeyRef",
|
|
225
|
+
"method",
|
|
226
|
+
"x5c"
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"type": "object",
|
|
231
|
+
"properties": {
|
|
232
|
+
"noIssPayloadUpdate": {
|
|
233
|
+
"type": "boolean"
|
|
234
|
+
},
|
|
235
|
+
"noIdentifierInHeader": {
|
|
236
|
+
"type": "boolean"
|
|
237
|
+
},
|
|
238
|
+
"jwk": {
|
|
239
|
+
"$ref": "#/components/schemas/JWK"
|
|
240
|
+
},
|
|
241
|
+
"jwkThumbprint": {
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"kmsKeyRef": {
|
|
245
|
+
"type": "string"
|
|
246
|
+
},
|
|
247
|
+
"method": {
|
|
248
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
249
|
+
},
|
|
250
|
+
"key": {
|
|
251
|
+
"$ref": "#/components/schemas/IKey"
|
|
252
|
+
},
|
|
253
|
+
"kid": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"issuer": {
|
|
257
|
+
"type": "string"
|
|
258
|
+
},
|
|
259
|
+
"identifier": {
|
|
260
|
+
"$ref": "#/components/schemas/IIdentifier"
|
|
261
|
+
},
|
|
262
|
+
"did": {
|
|
263
|
+
"type": "string"
|
|
264
|
+
},
|
|
265
|
+
"keys": {
|
|
266
|
+
"type": "array",
|
|
267
|
+
"items": {
|
|
268
|
+
"$ref": "#/components/schemas/IKey"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"verificationMethodSection": {
|
|
272
|
+
"$ref": "#/components/schemas/DIDDocumentSection"
|
|
273
|
+
},
|
|
274
|
+
"controllerKeyId": {
|
|
275
|
+
"type": "string"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"required": [
|
|
279
|
+
"did",
|
|
280
|
+
"identifier",
|
|
281
|
+
"issuer",
|
|
282
|
+
"jwk",
|
|
283
|
+
"jwkThumbprint",
|
|
284
|
+
"key",
|
|
285
|
+
"keys",
|
|
286
|
+
"kid",
|
|
287
|
+
"kmsKeyRef",
|
|
288
|
+
"method"
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"type": "object",
|
|
293
|
+
"properties": {
|
|
294
|
+
"noIssPayloadUpdate": {
|
|
295
|
+
"type": "boolean"
|
|
296
|
+
},
|
|
297
|
+
"noIdentifierInHeader": {
|
|
298
|
+
"type": "boolean"
|
|
299
|
+
},
|
|
300
|
+
"jwk": {
|
|
301
|
+
"$ref": "#/components/schemas/JWK"
|
|
302
|
+
},
|
|
303
|
+
"jwkThumbprint": {
|
|
304
|
+
"type": "string"
|
|
305
|
+
},
|
|
306
|
+
"kmsKeyRef": {
|
|
307
|
+
"type": "string"
|
|
308
|
+
},
|
|
309
|
+
"method": {
|
|
310
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
311
|
+
},
|
|
312
|
+
"key": {
|
|
313
|
+
"$ref": "#/components/schemas/IKey"
|
|
314
|
+
},
|
|
315
|
+
"kid": {
|
|
316
|
+
"type": "string"
|
|
317
|
+
},
|
|
318
|
+
"issuer": {
|
|
319
|
+
"type": "string"
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"required": [
|
|
323
|
+
"jwk",
|
|
324
|
+
"jwkThumbprint",
|
|
325
|
+
"key",
|
|
326
|
+
"kmsKeyRef",
|
|
327
|
+
"method"
|
|
328
|
+
]
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"type": "object",
|
|
332
|
+
"properties": {
|
|
333
|
+
"noIssPayloadUpdate": {
|
|
334
|
+
"type": "boolean"
|
|
335
|
+
},
|
|
336
|
+
"noIdentifierInHeader": {
|
|
337
|
+
"type": "boolean"
|
|
338
|
+
},
|
|
339
|
+
"jwk": {
|
|
340
|
+
"$ref": "#/components/schemas/JWK"
|
|
341
|
+
},
|
|
342
|
+
"jwkThumbprint": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
},
|
|
345
|
+
"kmsKeyRef": {
|
|
346
|
+
"type": "string"
|
|
347
|
+
},
|
|
348
|
+
"method": {
|
|
349
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
350
|
+
},
|
|
351
|
+
"key": {
|
|
352
|
+
"$ref": "#/components/schemas/IKey"
|
|
353
|
+
},
|
|
354
|
+
"kid": {
|
|
355
|
+
"type": "string"
|
|
356
|
+
},
|
|
357
|
+
"issuer": {
|
|
358
|
+
"type": "string"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"required": [
|
|
362
|
+
"issuer",
|
|
363
|
+
"jwk",
|
|
364
|
+
"jwkThumbprint",
|
|
365
|
+
"key",
|
|
366
|
+
"kid",
|
|
367
|
+
"kmsKeyRef",
|
|
368
|
+
"method"
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"type": "object",
|
|
373
|
+
"properties": {
|
|
374
|
+
"noIssPayloadUpdate": {
|
|
375
|
+
"type": "boolean"
|
|
376
|
+
},
|
|
377
|
+
"noIdentifierInHeader": {
|
|
378
|
+
"type": "boolean"
|
|
379
|
+
},
|
|
380
|
+
"jwk": {
|
|
381
|
+
"$ref": "#/components/schemas/JWK"
|
|
382
|
+
},
|
|
383
|
+
"jwkThumbprint": {
|
|
384
|
+
"type": "string"
|
|
385
|
+
},
|
|
386
|
+
"kmsKeyRef": {
|
|
387
|
+
"type": "string"
|
|
388
|
+
},
|
|
389
|
+
"method": {
|
|
390
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
391
|
+
},
|
|
392
|
+
"key": {
|
|
393
|
+
"$ref": "#/components/schemas/IKey"
|
|
394
|
+
},
|
|
395
|
+
"kid": {
|
|
396
|
+
"type": "string"
|
|
397
|
+
},
|
|
398
|
+
"issuer": {
|
|
399
|
+
"type": "string"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"required": [
|
|
403
|
+
"issuer",
|
|
404
|
+
"jwk",
|
|
405
|
+
"jwkThumbprint",
|
|
406
|
+
"key",
|
|
407
|
+
"kid",
|
|
408
|
+
"kmsKeyRef",
|
|
409
|
+
"method"
|
|
410
|
+
]
|
|
180
411
|
}
|
|
181
412
|
]
|
|
182
413
|
},
|
|
@@ -547,6 +778,16 @@
|
|
|
547
778
|
],
|
|
548
779
|
"description": "Refers to a section of a DID document. Either the list of verification methods or services or one of the verification relationships.\n\nSee {@link https://www.w3.org/TR/did-core/#verification-relationships | verification relationships }"
|
|
549
780
|
},
|
|
781
|
+
"ManagedIdentifierMethod": {
|
|
782
|
+
"type": "string",
|
|
783
|
+
"enum": [
|
|
784
|
+
"did",
|
|
785
|
+
"jwk",
|
|
786
|
+
"x5c",
|
|
787
|
+
"kid",
|
|
788
|
+
"key"
|
|
789
|
+
]
|
|
790
|
+
},
|
|
550
791
|
"JwtHeader": {
|
|
551
792
|
"type": "object",
|
|
552
793
|
"properties": {
|
|
@@ -806,6 +1047,237 @@
|
|
|
806
1047
|
"required": [
|
|
807
1048
|
"identifier"
|
|
808
1049
|
]
|
|
1050
|
+
},
|
|
1051
|
+
{
|
|
1052
|
+
"type": "object",
|
|
1053
|
+
"properties": {
|
|
1054
|
+
"noIssPayloadUpdate": {
|
|
1055
|
+
"type": "boolean"
|
|
1056
|
+
},
|
|
1057
|
+
"noIdentifierInHeader": {
|
|
1058
|
+
"type": "boolean"
|
|
1059
|
+
},
|
|
1060
|
+
"jwk": {
|
|
1061
|
+
"$ref": "#/components/schemas/JWK"
|
|
1062
|
+
},
|
|
1063
|
+
"jwkThumbprint": {
|
|
1064
|
+
"type": "string"
|
|
1065
|
+
},
|
|
1066
|
+
"kmsKeyRef": {
|
|
1067
|
+
"type": "string"
|
|
1068
|
+
},
|
|
1069
|
+
"method": {
|
|
1070
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
1071
|
+
},
|
|
1072
|
+
"key": {
|
|
1073
|
+
"$ref": "#/components/schemas/IKey"
|
|
1074
|
+
},
|
|
1075
|
+
"kid": {
|
|
1076
|
+
"type": "string"
|
|
1077
|
+
},
|
|
1078
|
+
"issuer": {
|
|
1079
|
+
"type": "string"
|
|
1080
|
+
},
|
|
1081
|
+
"x5c": {
|
|
1082
|
+
"type": "array",
|
|
1083
|
+
"items": {
|
|
1084
|
+
"type": "string"
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
"certificate": {}
|
|
1088
|
+
},
|
|
1089
|
+
"required": [
|
|
1090
|
+
"certificate",
|
|
1091
|
+
"jwk",
|
|
1092
|
+
"jwkThumbprint",
|
|
1093
|
+
"key",
|
|
1094
|
+
"kmsKeyRef",
|
|
1095
|
+
"method",
|
|
1096
|
+
"x5c"
|
|
1097
|
+
]
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
"type": "object",
|
|
1101
|
+
"properties": {
|
|
1102
|
+
"noIssPayloadUpdate": {
|
|
1103
|
+
"type": "boolean"
|
|
1104
|
+
},
|
|
1105
|
+
"noIdentifierInHeader": {
|
|
1106
|
+
"type": "boolean"
|
|
1107
|
+
},
|
|
1108
|
+
"jwk": {
|
|
1109
|
+
"$ref": "#/components/schemas/JWK"
|
|
1110
|
+
},
|
|
1111
|
+
"jwkThumbprint": {
|
|
1112
|
+
"type": "string"
|
|
1113
|
+
},
|
|
1114
|
+
"kmsKeyRef": {
|
|
1115
|
+
"type": "string"
|
|
1116
|
+
},
|
|
1117
|
+
"method": {
|
|
1118
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
1119
|
+
},
|
|
1120
|
+
"key": {
|
|
1121
|
+
"$ref": "#/components/schemas/IKey"
|
|
1122
|
+
},
|
|
1123
|
+
"kid": {
|
|
1124
|
+
"type": "string"
|
|
1125
|
+
},
|
|
1126
|
+
"issuer": {
|
|
1127
|
+
"type": "string"
|
|
1128
|
+
},
|
|
1129
|
+
"identifier": {
|
|
1130
|
+
"$ref": "#/components/schemas/IIdentifier"
|
|
1131
|
+
},
|
|
1132
|
+
"did": {
|
|
1133
|
+
"type": "string"
|
|
1134
|
+
},
|
|
1135
|
+
"keys": {
|
|
1136
|
+
"type": "array",
|
|
1137
|
+
"items": {
|
|
1138
|
+
"$ref": "#/components/schemas/IKey"
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
"verificationMethodSection": {
|
|
1142
|
+
"$ref": "#/components/schemas/DIDDocumentSection"
|
|
1143
|
+
},
|
|
1144
|
+
"controllerKeyId": {
|
|
1145
|
+
"type": "string"
|
|
1146
|
+
}
|
|
1147
|
+
},
|
|
1148
|
+
"required": [
|
|
1149
|
+
"did",
|
|
1150
|
+
"identifier",
|
|
1151
|
+
"issuer",
|
|
1152
|
+
"jwk",
|
|
1153
|
+
"jwkThumbprint",
|
|
1154
|
+
"key",
|
|
1155
|
+
"keys",
|
|
1156
|
+
"kid",
|
|
1157
|
+
"kmsKeyRef",
|
|
1158
|
+
"method"
|
|
1159
|
+
]
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
"type": "object",
|
|
1163
|
+
"properties": {
|
|
1164
|
+
"noIssPayloadUpdate": {
|
|
1165
|
+
"type": "boolean"
|
|
1166
|
+
},
|
|
1167
|
+
"noIdentifierInHeader": {
|
|
1168
|
+
"type": "boolean"
|
|
1169
|
+
},
|
|
1170
|
+
"jwk": {
|
|
1171
|
+
"$ref": "#/components/schemas/JWK"
|
|
1172
|
+
},
|
|
1173
|
+
"jwkThumbprint": {
|
|
1174
|
+
"type": "string"
|
|
1175
|
+
},
|
|
1176
|
+
"kmsKeyRef": {
|
|
1177
|
+
"type": "string"
|
|
1178
|
+
},
|
|
1179
|
+
"method": {
|
|
1180
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
1181
|
+
},
|
|
1182
|
+
"key": {
|
|
1183
|
+
"$ref": "#/components/schemas/IKey"
|
|
1184
|
+
},
|
|
1185
|
+
"kid": {
|
|
1186
|
+
"type": "string"
|
|
1187
|
+
},
|
|
1188
|
+
"issuer": {
|
|
1189
|
+
"type": "string"
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1192
|
+
"required": [
|
|
1193
|
+
"jwk",
|
|
1194
|
+
"jwkThumbprint",
|
|
1195
|
+
"key",
|
|
1196
|
+
"kmsKeyRef",
|
|
1197
|
+
"method"
|
|
1198
|
+
]
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"type": "object",
|
|
1202
|
+
"properties": {
|
|
1203
|
+
"noIssPayloadUpdate": {
|
|
1204
|
+
"type": "boolean"
|
|
1205
|
+
},
|
|
1206
|
+
"noIdentifierInHeader": {
|
|
1207
|
+
"type": "boolean"
|
|
1208
|
+
},
|
|
1209
|
+
"jwk": {
|
|
1210
|
+
"$ref": "#/components/schemas/JWK"
|
|
1211
|
+
},
|
|
1212
|
+
"jwkThumbprint": {
|
|
1213
|
+
"type": "string"
|
|
1214
|
+
},
|
|
1215
|
+
"kmsKeyRef": {
|
|
1216
|
+
"type": "string"
|
|
1217
|
+
},
|
|
1218
|
+
"method": {
|
|
1219
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
1220
|
+
},
|
|
1221
|
+
"key": {
|
|
1222
|
+
"$ref": "#/components/schemas/IKey"
|
|
1223
|
+
},
|
|
1224
|
+
"kid": {
|
|
1225
|
+
"type": "string"
|
|
1226
|
+
},
|
|
1227
|
+
"issuer": {
|
|
1228
|
+
"type": "string"
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
"required": [
|
|
1232
|
+
"issuer",
|
|
1233
|
+
"jwk",
|
|
1234
|
+
"jwkThumbprint",
|
|
1235
|
+
"key",
|
|
1236
|
+
"kid",
|
|
1237
|
+
"kmsKeyRef",
|
|
1238
|
+
"method"
|
|
1239
|
+
]
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
"type": "object",
|
|
1243
|
+
"properties": {
|
|
1244
|
+
"noIssPayloadUpdate": {
|
|
1245
|
+
"type": "boolean"
|
|
1246
|
+
},
|
|
1247
|
+
"noIdentifierInHeader": {
|
|
1248
|
+
"type": "boolean"
|
|
1249
|
+
},
|
|
1250
|
+
"jwk": {
|
|
1251
|
+
"$ref": "#/components/schemas/JWK"
|
|
1252
|
+
},
|
|
1253
|
+
"jwkThumbprint": {
|
|
1254
|
+
"type": "string"
|
|
1255
|
+
},
|
|
1256
|
+
"kmsKeyRef": {
|
|
1257
|
+
"type": "string"
|
|
1258
|
+
},
|
|
1259
|
+
"method": {
|
|
1260
|
+
"$ref": "#/components/schemas/ManagedIdentifierMethod"
|
|
1261
|
+
},
|
|
1262
|
+
"key": {
|
|
1263
|
+
"$ref": "#/components/schemas/IKey"
|
|
1264
|
+
},
|
|
1265
|
+
"kid": {
|
|
1266
|
+
"type": "string"
|
|
1267
|
+
},
|
|
1268
|
+
"issuer": {
|
|
1269
|
+
"type": "string"
|
|
1270
|
+
}
|
|
1271
|
+
},
|
|
1272
|
+
"required": [
|
|
1273
|
+
"issuer",
|
|
1274
|
+
"jwk",
|
|
1275
|
+
"jwkThumbprint",
|
|
1276
|
+
"key",
|
|
1277
|
+
"kid",
|
|
1278
|
+
"kmsKeyRef",
|
|
1279
|
+
"method"
|
|
1280
|
+
]
|
|
809
1281
|
}
|
|
810
1282
|
]
|
|
811
1283
|
},
|
|
@@ -951,9 +1423,6 @@
|
|
|
951
1423
|
"protectedHeader"
|
|
952
1424
|
]
|
|
953
1425
|
},
|
|
954
|
-
"issuer": {
|
|
955
|
-
"$ref": "#/components/schemas/ManagedIdentifierOpts"
|
|
956
|
-
},
|
|
957
1426
|
"identifier": {
|
|
958
1427
|
"$ref": "#/components/schemas/ManagedIdentifierResult"
|
|
959
1428
|
}
|
|
@@ -961,7 +1430,6 @@
|
|
|
961
1430
|
"required": [
|
|
962
1431
|
"jws",
|
|
963
1432
|
"b64",
|
|
964
|
-
"issuer",
|
|
965
1433
|
"identifier"
|
|
966
1434
|
]
|
|
967
1435
|
},
|
|
@@ -1029,145 +1497,6 @@
|
|
|
1029
1497
|
"payload"
|
|
1030
1498
|
]
|
|
1031
1499
|
},
|
|
1032
|
-
"ManagedIdentifierOpts": {
|
|
1033
|
-
"anyOf": [
|
|
1034
|
-
{
|
|
1035
|
-
"type": "object",
|
|
1036
|
-
"properties": {
|
|
1037
|
-
"method": {
|
|
1038
|
-
"type": "string",
|
|
1039
|
-
"const": "jwk"
|
|
1040
|
-
},
|
|
1041
|
-
"identifier": {
|
|
1042
|
-
"$ref": "#/components/schemas/ManagedIdentifierType"
|
|
1043
|
-
},
|
|
1044
|
-
"kmsKeyRef": {
|
|
1045
|
-
"type": "string"
|
|
1046
|
-
},
|
|
1047
|
-
"issuer": {
|
|
1048
|
-
"type": "string"
|
|
1049
|
-
},
|
|
1050
|
-
"kid": {
|
|
1051
|
-
"type": "string"
|
|
1052
|
-
}
|
|
1053
|
-
},
|
|
1054
|
-
"required": [
|
|
1055
|
-
"identifier"
|
|
1056
|
-
]
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
"type": "object",
|
|
1060
|
-
"properties": {
|
|
1061
|
-
"method": {
|
|
1062
|
-
"type": "string",
|
|
1063
|
-
"const": "x5c"
|
|
1064
|
-
},
|
|
1065
|
-
"identifier": {
|
|
1066
|
-
"$ref": "#/components/schemas/ManagedIdentifierType"
|
|
1067
|
-
},
|
|
1068
|
-
"kmsKeyRef": {
|
|
1069
|
-
"type": "string"
|
|
1070
|
-
},
|
|
1071
|
-
"issuer": {
|
|
1072
|
-
"type": "string"
|
|
1073
|
-
},
|
|
1074
|
-
"kid": {
|
|
1075
|
-
"type": "string"
|
|
1076
|
-
}
|
|
1077
|
-
},
|
|
1078
|
-
"required": [
|
|
1079
|
-
"identifier"
|
|
1080
|
-
]
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
"type": "object",
|
|
1084
|
-
"properties": {
|
|
1085
|
-
"method": {
|
|
1086
|
-
"type": "string",
|
|
1087
|
-
"const": "did"
|
|
1088
|
-
},
|
|
1089
|
-
"identifier": {
|
|
1090
|
-
"$ref": "#/components/schemas/ManagedIdentifierType"
|
|
1091
|
-
},
|
|
1092
|
-
"kmsKeyRef": {
|
|
1093
|
-
"type": "string"
|
|
1094
|
-
},
|
|
1095
|
-
"issuer": {
|
|
1096
|
-
"type": "string"
|
|
1097
|
-
},
|
|
1098
|
-
"kid": {
|
|
1099
|
-
"type": "string"
|
|
1100
|
-
},
|
|
1101
|
-
"keyType": {
|
|
1102
|
-
"$ref": "#/components/schemas/TKeyType"
|
|
1103
|
-
},
|
|
1104
|
-
"offlineWhenNoDIDRegistered": {
|
|
1105
|
-
"type": "boolean"
|
|
1106
|
-
},
|
|
1107
|
-
"noVerificationMethodFallback": {
|
|
1108
|
-
"type": "boolean"
|
|
1109
|
-
},
|
|
1110
|
-
"controllerKey": {
|
|
1111
|
-
"type": "boolean"
|
|
1112
|
-
},
|
|
1113
|
-
"vmRelationship": {
|
|
1114
|
-
"$ref": "#/components/schemas/DIDDocumentSection"
|
|
1115
|
-
}
|
|
1116
|
-
},
|
|
1117
|
-
"required": [
|
|
1118
|
-
"identifier"
|
|
1119
|
-
]
|
|
1120
|
-
},
|
|
1121
|
-
{
|
|
1122
|
-
"type": "object",
|
|
1123
|
-
"properties": {
|
|
1124
|
-
"method": {
|
|
1125
|
-
"type": "string",
|
|
1126
|
-
"const": "kid"
|
|
1127
|
-
},
|
|
1128
|
-
"identifier": {
|
|
1129
|
-
"$ref": "#/components/schemas/ManagedIdentifierType"
|
|
1130
|
-
},
|
|
1131
|
-
"kmsKeyRef": {
|
|
1132
|
-
"type": "string"
|
|
1133
|
-
},
|
|
1134
|
-
"issuer": {
|
|
1135
|
-
"type": "string"
|
|
1136
|
-
},
|
|
1137
|
-
"kid": {
|
|
1138
|
-
"type": "string"
|
|
1139
|
-
}
|
|
1140
|
-
},
|
|
1141
|
-
"required": [
|
|
1142
|
-
"identifier"
|
|
1143
|
-
]
|
|
1144
|
-
},
|
|
1145
|
-
{
|
|
1146
|
-
"type": "object",
|
|
1147
|
-
"properties": {
|
|
1148
|
-
"method": {
|
|
1149
|
-
"type": "string",
|
|
1150
|
-
"const": "key"
|
|
1151
|
-
},
|
|
1152
|
-
"identifier": {
|
|
1153
|
-
"$ref": "#/components/schemas/ManagedIdentifierType"
|
|
1154
|
-
},
|
|
1155
|
-
"kmsKeyRef": {
|
|
1156
|
-
"type": "string"
|
|
1157
|
-
},
|
|
1158
|
-
"issuer": {
|
|
1159
|
-
"type": "string"
|
|
1160
|
-
},
|
|
1161
|
-
"kid": {
|
|
1162
|
-
"type": "string"
|
|
1163
|
-
}
|
|
1164
|
-
},
|
|
1165
|
-
"required": [
|
|
1166
|
-
"identifier"
|
|
1167
|
-
]
|
|
1168
|
-
}
|
|
1169
|
-
]
|
|
1170
|
-
},
|
|
1171
1500
|
"ManagedIdentifierResult": {
|
|
1172
1501
|
"anyOf": [
|
|
1173
1502
|
{
|
|
@@ -1372,16 +1701,6 @@
|
|
|
1372
1701
|
]
|
|
1373
1702
|
}
|
|
1374
1703
|
]
|
|
1375
|
-
},
|
|
1376
|
-
"ManagedIdentifierMethod": {
|
|
1377
|
-
"type": "string",
|
|
1378
|
-
"enum": [
|
|
1379
|
-
"did",
|
|
1380
|
-
"jwk",
|
|
1381
|
-
"x5c",
|
|
1382
|
-
"kid",
|
|
1383
|
-
"key"
|
|
1384
|
-
]
|
|
1385
1704
|
}
|
|
1386
1705
|
},
|
|
1387
1706
|
"methods": {
|
package/src/functions/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
isManagedIdentifierDidResult,
|
|
3
3
|
isManagedIdentifierX5cResult,
|
|
4
4
|
ManagedIdentifierMethod,
|
|
5
|
-
ManagedIdentifierResult,
|
|
5
|
+
ManagedIdentifierResult, ensureManagedIdentifierResult,
|
|
6
6
|
} from '@sphereon/ssi-sdk-ext.identifier-resolution'
|
|
7
7
|
import {bytesToBase64url, encodeJoseBlob} from '@veramo/utils'
|
|
8
8
|
import * as u8a from 'uint8arrays'
|
|
@@ -35,7 +35,7 @@ export const prepareJwsObject = async (args: CreateJwsJsonArgs, context: IRequir
|
|
|
35
35
|
if (!combinedHeader.alg) {
|
|
36
36
|
return Promise.reject(`No 'alg' key present in the JWS header`)
|
|
37
37
|
}
|
|
38
|
-
const identifier = await
|
|
38
|
+
const identifier = await ensureManagedIdentifierResult(issuer, context)
|
|
39
39
|
await checkAndUpdateJwtHeader({mode, identifier, noIdentifierInHeader, header: protectedHeader}, context)
|
|
40
40
|
|
|
41
41
|
const isBytes = payload instanceof Uint8Array
|
|
@@ -60,7 +60,6 @@ export const prepareJwsObject = async (args: CreateJwsJsonArgs, context: IRequir
|
|
|
60
60
|
protectedHeader: base64urlHeader,
|
|
61
61
|
payload: base64urlPayload,
|
|
62
62
|
},
|
|
63
|
-
issuer,
|
|
64
63
|
identifier,
|
|
65
64
|
}
|
|
66
65
|
}
|
package/src/types/IJwtService.ts
CHANGED
|
@@ -52,7 +52,6 @@ export interface JwsJsonGeneral {
|
|
|
52
52
|
export interface PreparedJwsObject {
|
|
53
53
|
jws: PreparedJws
|
|
54
54
|
b64: { payload: string; protectedHeader: string } // header is always json, as it can only be used in JwsJson
|
|
55
|
-
issuer: ManagedIdentifierOpts
|
|
56
55
|
identifier: ManagedIdentifierResult
|
|
57
56
|
}
|
|
58
57
|
|
|
@@ -91,7 +90,7 @@ export type CreateJwsMode = 'x5c' | 'kid' | 'jwk' | 'did' | 'auto'
|
|
|
91
90
|
|
|
92
91
|
export type CreateJwsArgs = {
|
|
93
92
|
mode?: CreateJwsMode
|
|
94
|
-
issuer: ManagedIdentifierOpts & { noIssPayloadUpdate?: boolean, noIdentifierInHeader?: boolean }
|
|
93
|
+
issuer: (ManagedIdentifierOpts | ManagedIdentifierResult) & { noIssPayloadUpdate?: boolean, noIdentifierInHeader?: boolean }
|
|
95
94
|
protectedHeader: JwtHeader
|
|
96
95
|
payload: JwtPayload | Uint8Array | string
|
|
97
96
|
}
|