@digitalbazaar/oid4-client 5.4.0 → 5.4.1
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/lib/convert/index.js +13 -2
- package/package.json +1 -1
package/lib/convert/index.js
CHANGED
|
@@ -270,10 +270,11 @@ function _strictCheckVprGroups({groupMap, queryFormats}) {
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
function _fromDIDAuthenticationQuery({query, strict = false}) {
|
|
273
|
+
const vp_formats = {};
|
|
273
274
|
const vp_formats_supported = {};
|
|
274
275
|
const client_metadata = {
|
|
275
276
|
require_signed_request_object: false,
|
|
276
|
-
vp_formats
|
|
277
|
+
vp_formats,
|
|
277
278
|
vp_formats_supported
|
|
278
279
|
};
|
|
279
280
|
|
|
@@ -300,13 +301,23 @@ function _fromDIDAuthenticationQuery({query, strict = false}) {
|
|
|
300
301
|
for(const envelope of query.acceptedEnvelopes) {
|
|
301
302
|
if(envelope === 'application/jwt') {
|
|
302
303
|
// legacy (before OID4VP 1.0)
|
|
303
|
-
|
|
304
|
+
vp_formats.jwt_vp = vp_formats.jwt_vp_json = {
|
|
305
|
+
alg: ['EdDSA', 'Ed25519', 'ES256', 'ES384']
|
|
306
|
+
};
|
|
304
307
|
// OID4VP 1.0+
|
|
305
308
|
vp_formats_supported.jwt_vc_json = {};
|
|
306
309
|
} else if(envelope === 'application/mdl' ||
|
|
307
310
|
envelope === 'application/mdoc') {
|
|
311
|
+
// legacy (before OID4VP 1.0)
|
|
312
|
+
vp_formats.mso_mdoc = {
|
|
313
|
+
alg: ['EdDSA', 'ES256']
|
|
314
|
+
};
|
|
315
|
+
// OID4VP 1.0+
|
|
308
316
|
vp_formats_supported.mso_mdoc = {};
|
|
309
317
|
} else if(envelope === 'application/dc+sd-jwt') {
|
|
318
|
+
// legacy (before OID4VP 1.0)
|
|
319
|
+
vp_formats['dc+sd-jwt'] = {};
|
|
320
|
+
// OID4VP 1.0+
|
|
310
321
|
vp_formats_supported['dc+sd-jwt'] = {};
|
|
311
322
|
}
|
|
312
323
|
// ignore unknown envelope format
|