@sphereon/oid4vci-common 0.7.1-next.16 → 0.7.1-next.18
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/IssuerMetadataUtils.d.ts +9 -3
- package/dist/functions/IssuerMetadataUtils.d.ts.map +1 -1
- package/dist/functions/IssuerMetadataUtils.js +60 -25
- package/dist/functions/IssuerMetadataUtils.js.map +1 -1
- package/dist/types/Generic.types.d.ts +4 -0
- package/dist/types/Generic.types.d.ts.map +1 -1
- package/dist/types/Generic.types.js.map +1 -1
- package/lib/functions/IssuerMetadataUtils.ts +65 -25
- package/lib/types/Generic.types.ts +5 -0
- package/package.json +2 -2
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { CredentialIssuerMetadata,
|
|
1
|
+
import { CredentialIssuerMetadata, CredentialSupported, CredentialSupportedTypeV1_0_08, CredentialSupportedV1_0_08, IssuerMetadataV1_0_08, MetadataDisplay, OID4VCICredentialFormat, OpenId4VCIVersion } from '../types';
|
|
2
2
|
export declare function getSupportedCredentials(opts?: {
|
|
3
3
|
issuerMetadata?: CredentialIssuerMetadata | IssuerMetadataV1_0_08;
|
|
4
4
|
version: OpenId4VCIVersion;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
types?: string[][];
|
|
6
|
+
format?: (OID4VCICredentialFormat | string) | (OID4VCICredentialFormat | string)[];
|
|
7
|
+
}): CredentialSupported[];
|
|
8
|
+
export declare function getSupportedCredential(opts?: {
|
|
9
|
+
issuerMetadata?: CredentialIssuerMetadata | IssuerMetadataV1_0_08;
|
|
10
|
+
version: OpenId4VCIVersion;
|
|
11
|
+
types?: string | string[];
|
|
12
|
+
format?: (OID4VCICredentialFormat | string) | (OID4VCICredentialFormat | string)[];
|
|
7
13
|
}): CredentialSupported[];
|
|
8
14
|
export declare function credentialsSupportedV8ToV11(supportedV8: CredentialSupportedTypeV1_0_08): CredentialSupported[];
|
|
9
15
|
export declare function credentialSupportedV8ToV11(key: string, supportedV8: CredentialSupportedV1_0_08): CredentialSupported[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IssuerMetadataUtils.d.ts","sourceRoot":"","sources":["../../lib/functions/IssuerMetadataUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,
|
|
1
|
+
{"version":3,"file":"IssuerMetadataUtils.d.ts","sourceRoot":"","sources":["../../lib/functions/IssuerMetadataUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAExB,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB,wBAAgB,uBAAuB,CAAC,IAAI,CAAC,EAAE;IAC7C,cAAc,CAAC,EAAE,wBAAwB,GAAG,qBAAqB,CAAC;IAClE,OAAO,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,CAAC,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,GAAG,MAAM,CAAC,EAAE,CAAC;CACpF,GAAG,mBAAmB,EAAE,CAKxB;AAED,wBAAgB,sBAAsB,CAAC,IAAI,CAAC,EAAE;IAC5C,cAAc,CAAC,EAAE,wBAAwB,GAAG,qBAAqB,CAAC;IAClE,OAAO,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,GAAG,MAAM,CAAC,EAAE,CAAC;CACpF,GAAG,mBAAmB,EAAE,CA2ExB;AAaD,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,8BAA8B,GAAG,mBAAmB,EAAE,CAM9G;AAED,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,0BAA0B,GAAG,mBAAmB,EAAE,CAgBtH;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,qBAAqB,EAAE,IAAI,CAAC,EAAE;IAAE,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,eAAe,EAAE,CAMjJ"}
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIssuerDisplays = exports.credentialSupportedV8ToV11 = exports.credentialsSupportedV8ToV11 = exports.getSupportedCredentials = void 0;
|
|
3
|
+
exports.getIssuerDisplays = exports.credentialSupportedV8ToV11 = exports.credentialsSupportedV8ToV11 = exports.getSupportedCredential = exports.getSupportedCredentials = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
function getSupportedCredentials(opts) {
|
|
6
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.types) && Array.isArray(opts === null || opts === void 0 ? void 0 : opts.types)) {
|
|
7
|
+
return opts.types.flatMap((types) => getSupportedCredential(Object.assign(Object.assign({}, opts), { types })));
|
|
8
|
+
}
|
|
9
|
+
return getSupportedCredential(opts ? Object.assign(Object.assign({}, opts), { types: undefined }) : undefined);
|
|
10
|
+
}
|
|
11
|
+
exports.getSupportedCredentials = getSupportedCredentials;
|
|
12
|
+
function getSupportedCredential(opts) {
|
|
6
13
|
const { issuerMetadata } = opts !== null && opts !== void 0 ? opts : {};
|
|
14
|
+
let formats;
|
|
15
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.format) && Array.isArray(opts.format)) {
|
|
16
|
+
formats = opts.format;
|
|
17
|
+
}
|
|
18
|
+
else if ((opts === null || opts === void 0 ? void 0 : opts.format) && !Array.isArray(opts.format)) {
|
|
19
|
+
formats = [opts.format];
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
formats = [];
|
|
23
|
+
}
|
|
7
24
|
let credentialsSupported;
|
|
8
25
|
if (!issuerMetadata) {
|
|
9
26
|
return [];
|
|
10
27
|
}
|
|
11
|
-
const { version,
|
|
28
|
+
const { version, types } = opts !== null && opts !== void 0 ? opts : { version: types_1.OpenId4VCIVersion.VER_1_0_11 };
|
|
12
29
|
if (version === types_1.OpenId4VCIVersion.VER_1_0_08 || !Array.isArray(issuerMetadata.credentials_supported)) {
|
|
13
30
|
credentialsSupported = credentialsSupportedV8ToV11(issuerMetadata.credentials_supported);
|
|
14
|
-
/* const credentialsSupportedV8: CredentialSupportedV1_0_08 = credentialsSupported as CredentialSupportedV1_0_08
|
|
15
|
-
// const initiationTypes = credentialTypes.map(type => typeof type === 'string' ? [type] : type.types)
|
|
16
|
-
const supported: IssuerCredentialSubject = {}
|
|
17
|
-
for (const [key, value] of Object.entries(credentialsSupportedV8)) {
|
|
18
|
-
if (initiationTypes.find((type) => (typeof type === 'string' ? type === key : type.types.includes(key)))) {
|
|
19
|
-
supported[key] = value
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
// todo: fix this later. we're returning CredentialSupportedV1_0_08 as a list of CredentialSupported (for v09 onward)
|
|
23
|
-
return supported as unknown as CredentialSupported[]*/
|
|
24
31
|
}
|
|
25
32
|
else {
|
|
26
33
|
credentialsSupported = issuerMetadata.credentials_supported;
|
|
@@ -28,31 +35,59 @@ function getSupportedCredentials(opts) {
|
|
|
28
35
|
if (credentialsSupported === undefined || credentialsSupported.length === 0) {
|
|
29
36
|
return [];
|
|
30
37
|
}
|
|
31
|
-
else if (!
|
|
38
|
+
else if (!types || types.length === 0) {
|
|
32
39
|
return credentialsSupported;
|
|
33
40
|
}
|
|
34
41
|
/**
|
|
35
42
|
* the following (not array part is a legacy code from version 1_0-08 which JFF plugfest 2 implementors used)
|
|
36
43
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const supported = credentialsSupported.filter((sup) => sup.id === offerType || sup.types.includes(offerType));
|
|
42
|
-
if (supported) {
|
|
43
|
-
credentialSupportedOverlap.push(...supported);
|
|
44
|
-
}
|
|
44
|
+
let initiationTypes;
|
|
45
|
+
if (opts === null || opts === void 0 ? void 0 : opts.types) {
|
|
46
|
+
if (typeof opts.types === 'string') {
|
|
47
|
+
initiationTypes = [opts.types];
|
|
45
48
|
}
|
|
46
49
|
else {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
initiationTypes = opts.types;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (version === types_1.OpenId4VCIVersion.VER_1_0_08 && (!initiationTypes || (initiationTypes === null || initiationTypes === void 0 ? void 0 : initiationTypes.length) === 0)) {
|
|
54
|
+
initiationTypes = formats;
|
|
55
|
+
}
|
|
56
|
+
const supportedFormats = formats && formats.length > 0 ? formats : ['jwt_vc_json', 'jwt_vc_json-ld', 'ldp_vc'];
|
|
57
|
+
const credentialSupportedOverlap = [];
|
|
58
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.types) && typeof (opts === null || opts === void 0 ? void 0 : opts.types) === 'string') {
|
|
59
|
+
const supported = credentialsSupported.filter((sup) => sup.id === opts.types || (initiationTypes && arrayEqualsIgnoreOrder(sup.types, initiationTypes)));
|
|
60
|
+
if (supported) {
|
|
61
|
+
credentialSupportedOverlap.push(...supported);
|
|
62
|
+
}
|
|
63
|
+
} /*else if (initiationTypes && Array.isArray(initiationTypes) && initiationTypes.length === 1) {
|
|
64
|
+
|
|
65
|
+
const supported = credentialsSupported.filter(
|
|
66
|
+
(sup) => sup.id === initiationTypes![0] || (arrayEqualsIgnoreOrder(sup.types, initiationTypes!) && sup.types.includes(initiationTypes![0])),
|
|
67
|
+
);
|
|
68
|
+
if (supported) {
|
|
69
|
+
credentialSupportedOverlap.push(...supported);
|
|
70
|
+
}
|
|
71
|
+
}*/
|
|
72
|
+
else {
|
|
73
|
+
// Make sure we include Verifiable Credential both on the offer side as well as in the metadata side, to ensure consistency of the issuer does not.
|
|
74
|
+
if (initiationTypes && !initiationTypes.includes('VerifiableCredential')) {
|
|
75
|
+
initiationTypes.push('VerifiableCredential');
|
|
76
|
+
}
|
|
77
|
+
const supported = credentialsSupported.filter((sup) => {
|
|
78
|
+
const supTypes = sup.types;
|
|
79
|
+
if (!supTypes.includes('VerifiableCredential')) {
|
|
80
|
+
supTypes.push('VerifiableCredential');
|
|
50
81
|
}
|
|
82
|
+
return (!initiationTypes || arrayEqualsIgnoreOrder(supTypes, initiationTypes)) && supportedFormats.includes(sup.format);
|
|
83
|
+
});
|
|
84
|
+
if (supported) {
|
|
85
|
+
credentialSupportedOverlap.push(...supported);
|
|
51
86
|
}
|
|
52
87
|
}
|
|
53
88
|
return credentialSupportedOverlap;
|
|
54
89
|
}
|
|
55
|
-
exports.
|
|
90
|
+
exports.getSupportedCredential = getSupportedCredential;
|
|
56
91
|
function arrayEqualsIgnoreOrder(a, b) {
|
|
57
92
|
if (a.length !== b.length)
|
|
58
93
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IssuerMetadataUtils.js","sourceRoot":"","sources":["../../lib/functions/IssuerMetadataUtils.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"IssuerMetadataUtils.js","sourceRoot":"","sources":["../../lib/functions/IssuerMetadataUtils.ts"],"names":[],"mappings":";;;AAAA,oCAUkB;AAElB,SAAgB,uBAAuB,CAAC,IAKvC;IACC,IAAI,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,KAAI,KAAK,CAAC,OAAO,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,iCAAM,IAAI,KAAE,KAAK,IAAG,CAAC,CAAC;KAClF;IACD,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC,iCAAM,IAAI,KAAE,KAAK,EAAE,SAAS,IAAG,CAAC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AAI,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CACzI,mCAAI,EAAE,CAAC;IACV,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,mCAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA,EAAA,CAAC,CAAC;AACxH,CAAC;AAND,8CAMC"}
|
|
@@ -30,6 +30,9 @@ export type CredentialsSupportedDisplay = NameAndLocale & LogoAndColor & {
|
|
|
30
30
|
export type MetadataDisplay = NameAndLocale & LogoAndColor & {
|
|
31
31
|
name?: string;
|
|
32
32
|
};
|
|
33
|
+
export interface CredentialSupplierConfig {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}
|
|
33
36
|
export interface CredentialIssuerMetadataOpts {
|
|
34
37
|
credential_endpoint?: string;
|
|
35
38
|
batch_credential_endpoint?: string;
|
|
@@ -38,6 +41,7 @@ export interface CredentialIssuerMetadataOpts {
|
|
|
38
41
|
authorization_server?: string;
|
|
39
42
|
token_endpoint?: string;
|
|
40
43
|
display?: MetadataDisplay[];
|
|
44
|
+
credential_supplier_config?: CredentialSupplierConfig;
|
|
41
45
|
}
|
|
42
46
|
export interface CredentialIssuerMetadata extends CredentialIssuerMetadataOpts, Partial<AuthorizationServerMetadata> {
|
|
43
47
|
credential_endpoint: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Generic.types.d.ts","sourceRoot":"","sources":["../../lib/types/Generic.types.ts"],"names":[],"mappings":"AAAA,OAAO,E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generic.types.js","sourceRoot":"","sources":["../../lib/types/Generic.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Generic.types.js","sourceRoot":"","sources":["../../lib/types/Generic.types.ts"],"names":[],"mappings":";;;AAqMa,QAAA,qBAAqB,GAAG,qBAAqB,CAAC"}
|
|
@@ -6,59 +6,99 @@ import {
|
|
|
6
6
|
CredentialSupportedV1_0_08,
|
|
7
7
|
IssuerMetadataV1_0_08,
|
|
8
8
|
MetadataDisplay,
|
|
9
|
+
OID4VCICredentialFormat,
|
|
9
10
|
OpenId4VCIVersion,
|
|
10
11
|
} from '../types';
|
|
11
12
|
|
|
12
13
|
export function getSupportedCredentials(opts?: {
|
|
13
14
|
issuerMetadata?: CredentialIssuerMetadata | IssuerMetadataV1_0_08;
|
|
14
15
|
version: OpenId4VCIVersion;
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
types?: string[][];
|
|
17
|
+
format?: (OID4VCICredentialFormat | string) | (OID4VCICredentialFormat | string)[];
|
|
18
|
+
}): CredentialSupported[] {
|
|
19
|
+
if (opts?.types && Array.isArray(opts?.types)) {
|
|
20
|
+
return opts.types.flatMap((types) => getSupportedCredential({ ...opts, types }));
|
|
21
|
+
}
|
|
22
|
+
return getSupportedCredential(opts ? { ...opts, types: undefined } : undefined);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function getSupportedCredential(opts?: {
|
|
26
|
+
issuerMetadata?: CredentialIssuerMetadata | IssuerMetadataV1_0_08;
|
|
27
|
+
version: OpenId4VCIVersion;
|
|
28
|
+
types?: string | string[];
|
|
29
|
+
format?: (OID4VCICredentialFormat | string) | (OID4VCICredentialFormat | string)[];
|
|
17
30
|
}): CredentialSupported[] {
|
|
18
31
|
const { issuerMetadata } = opts ?? {};
|
|
32
|
+
let formats: (OID4VCICredentialFormat | string)[];
|
|
33
|
+
if (opts?.format && Array.isArray(opts.format)) {
|
|
34
|
+
formats = opts.format;
|
|
35
|
+
} else if (opts?.format && !Array.isArray(opts.format)) {
|
|
36
|
+
formats = [opts.format];
|
|
37
|
+
} else {
|
|
38
|
+
formats = [];
|
|
39
|
+
}
|
|
19
40
|
let credentialsSupported: CredentialSupported[];
|
|
20
41
|
if (!issuerMetadata) {
|
|
21
42
|
return [];
|
|
22
43
|
}
|
|
23
|
-
const { version,
|
|
44
|
+
const { version, types } = opts ?? { version: OpenId4VCIVersion.VER_1_0_11 };
|
|
24
45
|
if (version === OpenId4VCIVersion.VER_1_0_08 || !Array.isArray(issuerMetadata.credentials_supported)) {
|
|
25
46
|
credentialsSupported = credentialsSupportedV8ToV11((issuerMetadata as IssuerMetadataV1_0_08).credentials_supported);
|
|
26
|
-
/* const credentialsSupportedV8: CredentialSupportedV1_0_08 = credentialsSupported as CredentialSupportedV1_0_08
|
|
27
|
-
// const initiationTypes = credentialTypes.map(type => typeof type === 'string' ? [type] : type.types)
|
|
28
|
-
const supported: IssuerCredentialSubject = {}
|
|
29
|
-
for (const [key, value] of Object.entries(credentialsSupportedV8)) {
|
|
30
|
-
if (initiationTypes.find((type) => (typeof type === 'string' ? type === key : type.types.includes(key)))) {
|
|
31
|
-
supported[key] = value
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
// todo: fix this later. we're returning CredentialSupportedV1_0_08 as a list of CredentialSupported (for v09 onward)
|
|
35
|
-
return supported as unknown as CredentialSupported[]*/
|
|
36
47
|
} else {
|
|
37
48
|
credentialsSupported = (issuerMetadata as CredentialIssuerMetadata).credentials_supported;
|
|
38
49
|
}
|
|
39
50
|
|
|
40
51
|
if (credentialsSupported === undefined || credentialsSupported.length === 0) {
|
|
41
52
|
return [];
|
|
42
|
-
} else if (!
|
|
53
|
+
} else if (!types || types.length === 0) {
|
|
43
54
|
return credentialsSupported;
|
|
44
55
|
}
|
|
45
56
|
/**
|
|
46
57
|
* the following (not array part is a legacy code from version 1_0-08 which JFF plugfest 2 implementors used)
|
|
47
58
|
*/
|
|
48
|
-
|
|
59
|
+
let initiationTypes: string[] | undefined;
|
|
60
|
+
if (opts?.types) {
|
|
61
|
+
if (typeof opts.types === 'string') {
|
|
62
|
+
initiationTypes = [opts.types];
|
|
63
|
+
} else {
|
|
64
|
+
initiationTypes = opts.types;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (version === OpenId4VCIVersion.VER_1_0_08 && (!initiationTypes || initiationTypes?.length === 0)) {
|
|
68
|
+
initiationTypes = formats;
|
|
69
|
+
}
|
|
70
|
+
const supportedFormats: (CredentialOfferFormat | string)[] = formats && formats.length > 0 ? formats : ['jwt_vc_json', 'jwt_vc_json-ld', 'ldp_vc'];
|
|
49
71
|
|
|
50
72
|
const credentialSupportedOverlap: CredentialSupported[] = [];
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
73
|
+
if (opts?.types && typeof opts?.types === 'string') {
|
|
74
|
+
const supported = credentialsSupported.filter(
|
|
75
|
+
(sup) => sup.id === opts.types || (initiationTypes && arrayEqualsIgnoreOrder(sup.types, initiationTypes)),
|
|
76
|
+
);
|
|
77
|
+
if (supported) {
|
|
78
|
+
credentialSupportedOverlap.push(...supported);
|
|
79
|
+
}
|
|
80
|
+
} /*else if (initiationTypes && Array.isArray(initiationTypes) && initiationTypes.length === 1) {
|
|
81
|
+
|
|
82
|
+
const supported = credentialsSupported.filter(
|
|
83
|
+
(sup) => sup.id === initiationTypes![0] || (arrayEqualsIgnoreOrder(sup.types, initiationTypes!) && sup.types.includes(initiationTypes![0])),
|
|
84
|
+
);
|
|
85
|
+
if (supported) {
|
|
86
|
+
credentialSupportedOverlap.push(...supported);
|
|
87
|
+
}
|
|
88
|
+
}*/ else {
|
|
89
|
+
// Make sure we include Verifiable Credential both on the offer side as well as in the metadata side, to ensure consistency of the issuer does not.
|
|
90
|
+
if (initiationTypes && !initiationTypes.includes('VerifiableCredential')) {
|
|
91
|
+
initiationTypes.push('VerifiableCredential');
|
|
92
|
+
}
|
|
93
|
+
const supported = credentialsSupported.filter((sup) => {
|
|
94
|
+
const supTypes = sup.types;
|
|
95
|
+
if (!supTypes.includes('VerifiableCredential')) {
|
|
96
|
+
supTypes.push('VerifiableCredential');
|
|
61
97
|
}
|
|
98
|
+
return (!initiationTypes || arrayEqualsIgnoreOrder(supTypes, initiationTypes)) && supportedFormats.includes(sup.format);
|
|
99
|
+
});
|
|
100
|
+
if (supported) {
|
|
101
|
+
credentialSupportedOverlap.push(...supported);
|
|
62
102
|
}
|
|
63
103
|
}
|
|
64
104
|
return credentialSupportedOverlap;
|
|
@@ -41,6 +41,10 @@ export type MetadataDisplay = NameAndLocale &
|
|
|
41
41
|
name?: string; //OPTIONAL. String value of a display name for the Credential Issuer.
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
export interface CredentialSupplierConfig {
|
|
45
|
+
[key: string]: any; // This allows additional properties for credential suppliers
|
|
46
|
+
}
|
|
47
|
+
|
|
44
48
|
export interface CredentialIssuerMetadataOpts {
|
|
45
49
|
credential_endpoint?: string; // REQUIRED. URL of the Credential Issuer's Credential Endpoint. This URL MUST use the https scheme and MAY contain port, path and query parameter components.
|
|
46
50
|
batch_credential_endpoint?: string; // OPTIONAL. URL of the Credential Issuer's Batch Credential Endpoint. This URL MUST use the https scheme and MAY contain port, path and query parameter components. If omitted, the Credential Issuer does not support the Batch Credential Endpoint.
|
|
@@ -49,6 +53,7 @@ export interface CredentialIssuerMetadataOpts {
|
|
|
49
53
|
authorization_server?: string; // OPTIONAL. Identifier of the OAuth 2.0 Authorization Server (as defined in [RFC8414]) the Credential Issuer relies on for authorization. If this element is omitted, the entity providing the Credential Issuer is also acting as the AS, i.e. the Credential Issuer's identifier is used as the OAuth 2.0 Issuer value to obtain the Authorization Server metadata as per [RFC8414].
|
|
50
54
|
token_endpoint?: string;
|
|
51
55
|
display?: MetadataDisplay[]; // An array of objects, where each object contains display properties of a Credential Issuer for a certain language. Below is a non-exhaustive list of valid parameters that MAY be included:
|
|
56
|
+
credential_supplier_config?: CredentialSupplierConfig
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
// For now we extend the opts above. Only difference is that the credential endpoint is optional in the Opts, as it can come from other sources. The value is however required in the eventual Issuer Metadata
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/oid4vci-common",
|
|
3
|
-
"version": "0.7.1-next.
|
|
3
|
+
"version": "0.7.1-next.18+9bde31c",
|
|
4
4
|
"description": "OpenID 4 Verifiable Credential Issuance Common Types",
|
|
5
5
|
"source": "lib/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "9bde31c9c3df1ad2586778432d296808be8de478"
|
|
50
50
|
}
|