@sphereon/ssi-sdk-ext.jwt-service 0.34.1-next.91 → 0.36.1-feat.SSISDK.83.11
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/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +13 -13
- package/plugin.schema.json +2 -2
- package/src/functions/JWE.ts +1 -1
- package/src/functions/index.ts +10 -10
package/dist/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk-ext.jwt-service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
4
4
|
"source": "./src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"generate-plugin-schema": "tsx ../../packages/dev/bin/sphereon.js dev generate-plugin-schema"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.
|
|
31
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.
|
|
32
|
-
"@sphereon/ssi-sdk-ext.key-manager": "0.
|
|
33
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.
|
|
34
|
-
"@sphereon/ssi-sdk-ext.x509-utils": "0.
|
|
35
|
-
"@sphereon/ssi-sdk.agent-config": "0.
|
|
36
|
-
"@sphereon/ssi-types": "0.
|
|
30
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
31
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
32
|
+
"@sphereon/ssi-sdk-ext.key-manager": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.x509-utils": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
35
|
+
"@sphereon/ssi-sdk.agent-config": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
36
|
+
"@sphereon/ssi-types": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
37
37
|
"@stablelib/random": "^1.0.2",
|
|
38
38
|
"@veramo/core": "4.2.0",
|
|
39
39
|
"@veramo/utils": "4.2.0",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"uint8arrays": "3.1.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.
|
|
47
|
-
"@sphereon/ssi-sdk-ext.did-provider-web": "0.
|
|
48
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.
|
|
49
|
-
"@sphereon/ssi-sdk-ext.kms-local": "0.
|
|
46
|
+
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
47
|
+
"@sphereon/ssi-sdk-ext.did-provider-web": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
48
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
49
|
+
"@sphereon/ssi-sdk-ext.kms-local": "0.36.1-feat.SSISDK.83.11+15665c90",
|
|
50
50
|
"@sphereon/ssi-sdk.dev": "0.33.0",
|
|
51
51
|
"@veramo/data-store": "4.2.0",
|
|
52
52
|
"@veramo/did-manager": "4.2.0",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"X.509 Certificates",
|
|
84
84
|
"ARF"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "15665c90d27b72a0c3b7267375f60512d2cd4085"
|
|
87
87
|
}
|
package/plugin.schema.json
CHANGED
|
@@ -4563,9 +4563,9 @@
|
|
|
4563
4563
|
"description": "Represents an endpoint of a Service entry in a DID document."
|
|
4564
4564
|
},
|
|
4565
4565
|
"DidDocumentJwks": {
|
|
4566
|
-
"$ref": "#/components/schemas/Record<Exclude<DIDDocumentSection,(\"publicKey\"|\"service\")>,def-interface-st_index.d.ts-
|
|
4566
|
+
"$ref": "#/components/schemas/Record<Exclude<DIDDocumentSection,(\"publicKey\"|\"service\")>,def-interface-st_index.d.ts-36152-36877-st_index.d.ts-0-63876[]>"
|
|
4567
4567
|
},
|
|
4568
|
-
"Record<Exclude<DIDDocumentSection,(\"publicKey\"|\"service\")>,def-interface-st_index.d.ts-
|
|
4568
|
+
"Record<Exclude<DIDDocumentSection,(\"publicKey\"|\"service\")>,def-interface-st_index.d.ts-36152-36877-st_index.d.ts-0-63876[]>": {
|
|
4569
4569
|
"type": "object",
|
|
4570
4570
|
"properties": {
|
|
4571
4571
|
"verificationMethod": {
|
package/src/functions/JWE.ts
CHANGED
|
@@ -268,7 +268,7 @@ export async function createJwe(
|
|
|
268
268
|
cleartext: Uint8Array,
|
|
269
269
|
encrypters: JweEncrypter[],
|
|
270
270
|
protectedHeader: JweProtectedHeader,
|
|
271
|
-
aad?: Uint8Array
|
|
271
|
+
aad?: Uint8Array,
|
|
272
272
|
): Promise<JweJsonGeneral> {
|
|
273
273
|
if (encrypters.length === 0) {
|
|
274
274
|
throw Error('JWE needs at least 1 encryptor')
|
package/src/functions/index.ts
CHANGED
|
@@ -112,7 +112,7 @@ export const createJwsJsonGeneral = async (args: CreateJwsJsonArgs, context: IRe
|
|
|
112
112
|
issuer,
|
|
113
113
|
mode,
|
|
114
114
|
},
|
|
115
|
-
context
|
|
115
|
+
context,
|
|
116
116
|
)
|
|
117
117
|
|
|
118
118
|
const alg: string | undefined = protectedHeader.alg ?? signatureAlgorithmFromKeyType({ type: identifier.key.type })
|
|
@@ -156,7 +156,7 @@ export const checkAndUpdateJwsHeader = async (
|
|
|
156
156
|
noIdentifierInHeader?: boolean
|
|
157
157
|
header: JwsHeader
|
|
158
158
|
},
|
|
159
|
-
context: IRequiredContext
|
|
159
|
+
context: IRequiredContext,
|
|
160
160
|
) => {
|
|
161
161
|
// Make sure we have an alg in the header (https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.1)
|
|
162
162
|
header.alg = header.alg ?? signatureAlgorithmFromKeyType({ type: identifier.key.type })
|
|
@@ -191,7 +191,7 @@ const checkAndUpdateX5cHeader = async (
|
|
|
191
191
|
identifier: ManagedIdentifierResult
|
|
192
192
|
noIdentifierInHeader?: boolean
|
|
193
193
|
},
|
|
194
|
-
context: IRequiredContext
|
|
194
|
+
context: IRequiredContext,
|
|
195
195
|
) => {
|
|
196
196
|
const { x5c } = header
|
|
197
197
|
if (x5c) {
|
|
@@ -220,7 +220,7 @@ const checkAndUpdateDidHeader = async (
|
|
|
220
220
|
identifier: ManagedIdentifierResult
|
|
221
221
|
noIdentifierInHeader?: boolean
|
|
222
222
|
},
|
|
223
|
-
context: IRequiredContext
|
|
223
|
+
context: IRequiredContext,
|
|
224
224
|
) => {
|
|
225
225
|
const { kid } = header
|
|
226
226
|
if (kid) {
|
|
@@ -249,7 +249,7 @@ const checkAndUpdateJwkHeader = async (
|
|
|
249
249
|
identifier: ManagedIdentifierResult
|
|
250
250
|
noIdentifierInHeader?: boolean
|
|
251
251
|
},
|
|
252
|
-
context: IRequiredContext
|
|
252
|
+
context: IRequiredContext,
|
|
253
253
|
) => {
|
|
254
254
|
const { jwk } = header
|
|
255
255
|
if (jwk) {
|
|
@@ -277,7 +277,7 @@ const checkAndUpdateKidHeader = async (
|
|
|
277
277
|
identifier: ManagedIdentifierResult
|
|
278
278
|
noIdentifierInHeader?: boolean
|
|
279
279
|
},
|
|
280
|
-
context: IRequiredContext
|
|
280
|
+
context: IRequiredContext,
|
|
281
281
|
) => {
|
|
282
282
|
const { kid } = header
|
|
283
283
|
if (kid) {
|
|
@@ -350,7 +350,7 @@ export const verifyJws = async (args: VerifyJwsArgs, context: IAgentContext<IIde
|
|
|
350
350
|
sigWithId,
|
|
351
351
|
valid,
|
|
352
352
|
}
|
|
353
|
-
})
|
|
353
|
+
}),
|
|
354
354
|
)
|
|
355
355
|
const error = errorMessages.length !== 0
|
|
356
356
|
const result = {
|
|
@@ -400,7 +400,7 @@ async function resolveExternalIdentifierFromJwsHeader(
|
|
|
400
400
|
args: {
|
|
401
401
|
jws: Jws
|
|
402
402
|
opts?: { x5c?: Omit<ExternalIdentifierX5cOpts, 'identifier'>; did?: Omit<ExternalIdentifierDidOpts, 'identifier'> }
|
|
403
|
-
}
|
|
403
|
+
},
|
|
404
404
|
) {
|
|
405
405
|
if (protectedHeader.x5c) {
|
|
406
406
|
const x5c = protectedHeader.x5c
|
|
@@ -452,7 +452,7 @@ export const toJwsJsonGeneralWithIdentifiers = async (
|
|
|
452
452
|
jwk?: JWK
|
|
453
453
|
opts?: { x5c?: Omit<ExternalIdentifierX5cOpts, 'identifier'>; did?: Omit<ExternalIdentifierDidOpts, 'identifier'> }
|
|
454
454
|
},
|
|
455
|
-
context: IAgentContext<IIdentifierResolution
|
|
455
|
+
context: IAgentContext<IIdentifierResolution>,
|
|
456
456
|
): Promise<JwsJsonGeneralWithIdentifiers> => {
|
|
457
457
|
const jws = await toJwsJsonGeneral(args, context)
|
|
458
458
|
const signatures = (await Promise.all(
|
|
@@ -466,7 +466,7 @@ export const toJwsJsonGeneralWithIdentifiers = async (
|
|
|
466
466
|
return { ...signature, identifier }
|
|
467
467
|
}
|
|
468
468
|
return undefined
|
|
469
|
-
})
|
|
469
|
+
}),
|
|
470
470
|
)) as Array<JwsJsonSignatureWithIdentifier>
|
|
471
471
|
|
|
472
472
|
return { payload: jws.payload, signatures }
|