@sphereon/ssi-sdk.oid4vci-holder 0.34.1-feature.SSISDK.62.226 → 0.34.1-feature.SSISDK.62.239
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 +5 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -12
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
- package/src/agent/OID4VCIHolder.ts +9 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.oid4vci-holder",
|
|
3
|
-
"version": "0.34.1-feature.SSISDK.62.
|
|
3
|
+
"version": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,27 +26,27 @@
|
|
|
26
26
|
"build": "tsup --config ../../tsup.config.ts --tsconfig ../../tsconfig.tsup.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sphereon/did-auth-siop": "0.19.1-feature.
|
|
29
|
+
"@sphereon/did-auth-siop": "0.19.1-feature.DIIPv4.173",
|
|
30
30
|
"@sphereon/kmp-mdoc-core": "0.2.0-SNAPSHOT.26",
|
|
31
|
-
"@sphereon/oid4vci-client": "0.19.1-feature.
|
|
32
|
-
"@sphereon/oid4vci-common": "0.19.1-feature.
|
|
33
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.62.
|
|
34
|
-
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.62.
|
|
35
|
-
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.62.
|
|
36
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.62.
|
|
37
|
-
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.62.
|
|
38
|
-
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.62.
|
|
39
|
-
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.62.
|
|
40
|
-
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.62.
|
|
41
|
-
"@sphereon/ssi-sdk.data-store-types": "0.34.1-feature.SSISDK.62.
|
|
42
|
-
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.62.
|
|
43
|
-
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.62.
|
|
44
|
-
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.62.
|
|
45
|
-
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.62.
|
|
46
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.62.
|
|
47
|
-
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.62.
|
|
48
|
-
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.62.
|
|
49
|
-
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.62.
|
|
31
|
+
"@sphereon/oid4vci-client": "0.19.1-feature.DIIPv4.173",
|
|
32
|
+
"@sphereon/oid4vci-common": "0.19.1-feature.DIIPv4.173",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.identifier-resolution": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
35
|
+
"@sphereon/ssi-sdk-ext.jwt-service": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
36
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
37
|
+
"@sphereon/ssi-sdk.contact-manager": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
38
|
+
"@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
39
|
+
"@sphereon/ssi-sdk.credential-store": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
40
|
+
"@sphereon/ssi-sdk.credential-validation": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
41
|
+
"@sphereon/ssi-sdk.data-store-types": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
42
|
+
"@sphereon/ssi-sdk.issuance-branding": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
43
|
+
"@sphereon/ssi-sdk.mdl-mdoc": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
44
|
+
"@sphereon/ssi-sdk.oidf-client": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
45
|
+
"@sphereon/ssi-sdk.sd-jwt": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
46
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
47
|
+
"@sphereon/ssi-sdk.siopv2-oid4vp-op-auth": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
48
|
+
"@sphereon/ssi-sdk.xstate-machine-persistence": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
49
|
+
"@sphereon/ssi-types": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
50
50
|
"@veramo/core": "4.2.0",
|
|
51
51
|
"@veramo/data-store": "4.2.0",
|
|
52
52
|
"@veramo/utils": "4.2.0",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"xstate": "^4.38.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@sphereon/oid4vc-common": "0.19.1-feature.
|
|
63
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.62.
|
|
62
|
+
"@sphereon/oid4vc-common": "0.19.1-feature.DIIPv4.173",
|
|
63
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.34.1-feature.SSISDK.62.239+f50c542f",
|
|
64
64
|
"@sphereon/ssi-sdk.siopv2-oid4vp-common": "workspace:*",
|
|
65
65
|
"@types/i18n-js": "^3.8.9",
|
|
66
66
|
"@types/lodash.memoize": "^4.1.9",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"OID4VCI",
|
|
91
91
|
"State Machine"
|
|
92
92
|
],
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "f50c542fcad1ecf148f40bfb40293016ba09a257"
|
|
94
94
|
}
|
|
@@ -4,14 +4,11 @@ import {
|
|
|
4
4
|
AuthorizationRequestOpts,
|
|
5
5
|
AuthorizationServerClientOpts,
|
|
6
6
|
AuthorizationServerOpts,
|
|
7
|
-
CredentialConfigurationSupported,
|
|
8
7
|
CredentialConfigurationSupportedJwtVcJsonLdAndLdpVcV1_0_15,
|
|
9
8
|
CredentialDefinitionJwtVcJsonLdAndLdpVcV1_0_15,
|
|
10
9
|
CredentialOfferRequestWithBaseUrl,
|
|
11
10
|
DefaultURISchemes,
|
|
12
11
|
EndpointMetadataResult,
|
|
13
|
-
getTypesFromAuthorizationDetails,
|
|
14
|
-
getTypesFromCredentialSupported,
|
|
15
12
|
getTypesFromObject,
|
|
16
13
|
Jwt,
|
|
17
14
|
NotificationRequest,
|
|
@@ -401,7 +398,6 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
401
398
|
formats = Array.from(new Set(authFormats))
|
|
402
399
|
}
|
|
403
400
|
let oid4vciClient: OpenID4VCIClient
|
|
404
|
-
let types: string[][] | undefined = undefined
|
|
405
401
|
let offer: CredentialOfferRequestWithBaseUrl | undefined
|
|
406
402
|
if (requestData.existingClientState) {
|
|
407
403
|
oid4vciClient = await OpenID4VCIClient.fromState({ state: requestData.existingClientState })
|
|
@@ -443,26 +439,23 @@ export class OID4VCIHolder implements IAgentPlugin {
|
|
|
443
439
|
}
|
|
444
440
|
}
|
|
445
441
|
|
|
442
|
+
let configurationIds: Array<string> = []
|
|
446
443
|
if (offer) {
|
|
447
|
-
|
|
448
|
-
(configId) => {
|
|
449
|
-
const config = oid4vciClient.endpointMetadata.credentialIssuerMetadata?.credential_configurations_supported[configId]
|
|
450
|
-
return config ? [config as CredentialConfigurationSupported] : []
|
|
451
|
-
},
|
|
452
|
-
)
|
|
453
|
-
types = credentialsSupported.map((credentialSupported) => getTypesFromCredentialSupported(credentialSupported))
|
|
444
|
+
configurationIds = offer.original_credential_offer.credential_configuration_ids
|
|
454
445
|
} else {
|
|
455
|
-
|
|
456
|
-
.
|
|
457
|
-
.
|
|
446
|
+
configurationIds = asArray(authorizationRequestOpts.authorizationDetails)
|
|
447
|
+
.filter((authDetails): authDetails is Exclude<AuthorizationDetails, string> => typeof authDetails !== 'string')
|
|
448
|
+
.map((authReqOpts) => authReqOpts.credential_configuration_id)
|
|
449
|
+
.filter((id): id is string => !!id)
|
|
458
450
|
}
|
|
459
451
|
|
|
460
|
-
const serverMetadata = await oid4vciClient.retrieveServerMetadata()
|
|
461
452
|
const credentialsSupported = await getCredentialConfigsSupportedMerged({
|
|
462
453
|
client: oid4vciClient,
|
|
463
454
|
vcFormatPreferences: formats,
|
|
464
|
-
|
|
455
|
+
configurationIds,
|
|
465
456
|
})
|
|
457
|
+
|
|
458
|
+
const serverMetadata = await oid4vciClient.retrieveServerMetadata()
|
|
466
459
|
const credentialBranding = await getCredentialBranding({ credentialsSupported, context })
|
|
467
460
|
const authorizationCodeURL = oid4vciClient.authorizationURL
|
|
468
461
|
if (authorizationCodeURL) {
|