@sphereon/oid4vci-common 0.4.1-unstable.261 → 0.4.1-unstable.262
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.
|
@@ -10,7 +10,7 @@ function getSupportedCredentials(opts) {
|
|
|
10
10
|
}
|
|
11
11
|
const { version, credentialTypes, supportedType } = opts !== null && opts !== void 0 ? opts : { version: types_1.OpenId4VCIVersion.VER_1_0_11 };
|
|
12
12
|
if (version === types_1.OpenId4VCIVersion.VER_1_0_08 || !Array.isArray(issuerMetadata.credentials_supported)) {
|
|
13
|
-
credentialsSupported = credentialsSupportedV8ToV11(issuerMetadata.credentials_supported
|
|
13
|
+
credentialsSupported = credentialsSupportedV8ToV11(issuerMetadata.credentials_supported);
|
|
14
14
|
/* const credentialsSupportedV8: CredentialSupportedV1_0_08 = credentialsSupported as CredentialSupportedV1_0_08
|
|
15
15
|
// const initiationTypes = credentialTypes.map(type => typeof type === 'string' ? [type] : type.types)
|
|
16
16
|
const supported: IssuerCredentialSubject = {}
|
|
@@ -25,7 +25,7 @@ function getSupportedCredentials(opts) {
|
|
|
25
25
|
else {
|
|
26
26
|
credentialsSupported = issuerMetadata.credentials_supported;
|
|
27
27
|
}
|
|
28
|
-
if (
|
|
28
|
+
if (credentialsSupported === undefined) {
|
|
29
29
|
return [];
|
|
30
30
|
}
|
|
31
31
|
else if (!credentialTypes || credentialTypes.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IssuerMetadataUtils.js","sourceRoot":"","sources":["../../lib/functions/IssuerMetadataUtils.ts"],"names":[],"mappings":";;;AAAA,oCAQkB;AAElB,SAAgB,uBAAuB,CAAC,IAKvC;IACC,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC;IACtC,IAAI,oBAA2C,CAAC;IAChD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,EAAE,CAAC;KACX;IACD,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QACvD,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACxB,MAAM,sBAAsB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACxC,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;YAC9B,MAAM,KAAK,CAAC,2BAA2B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;SAClE;QACD,IAAI,iBAAiB,GAAiC,EAAE,CAAC;QACzD,iBAAiB,iCACf,MAAM,EACN,OAAO,EAAE,WAAW,CAAC,OAAO,IACzB,sBAAsB,KACzB,iBAAiB,EAAE,WAAW,CAAC,MAAM,GACtC,CAAC;QACF,OAAO,iBAAwC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,gEAgBC"}
|
|
@@ -21,7 +21,7 @@ export function getSupportedCredentials(opts?: {
|
|
|
21
21
|
}
|
|
22
22
|
const { version, credentialTypes, supportedType } = opts ?? { version: OpenId4VCIVersion.VER_1_0_11 };
|
|
23
23
|
if (version === OpenId4VCIVersion.VER_1_0_08 || !Array.isArray(issuerMetadata.credentials_supported)) {
|
|
24
|
-
credentialsSupported = credentialsSupportedV8ToV11((issuerMetadata
|
|
24
|
+
credentialsSupported = credentialsSupportedV8ToV11((issuerMetadata as IssuerMetadataV1_0_08).credentials_supported);
|
|
25
25
|
/* const credentialsSupportedV8: CredentialSupportedV1_0_08 = credentialsSupported as CredentialSupportedV1_0_08
|
|
26
26
|
// const initiationTypes = credentialTypes.map(type => typeof type === 'string' ? [type] : type.types)
|
|
27
27
|
const supported: IssuerCredentialSubject = {}
|
|
@@ -36,7 +36,7 @@ export function getSupportedCredentials(opts?: {
|
|
|
36
36
|
credentialsSupported = (issuerMetadata as CredentialIssuerMetadata).credentials_supported;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
if (
|
|
39
|
+
if (credentialsSupported === undefined) {
|
|
40
40
|
return [];
|
|
41
41
|
} else if (!credentialTypes || credentialTypes.length === 0) {
|
|
42
42
|
return credentialsSupported;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/oid4vci-common",
|
|
3
|
-
"version": "0.4.1-unstable.
|
|
3
|
+
"version": "0.4.1-unstable.262+4fc4398",
|
|
4
4
|
"description": "OpenID 4 Verifiable Credential Issuance Common Types",
|
|
5
5
|
"source": "lib/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "4fc4398509aa08b04cc4a17eb04884aad15a9079"
|
|
49
49
|
}
|