@openeudi/openid4vp 0.10.0 → 0.10.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/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9695,8 +9695,9 @@ async function verifyPresentation(vpToken, query, options) {
|
|
|
9695
9695
|
const parsed = await parsePresentation(vpToken, options);
|
|
9696
9696
|
const dcqlFormat = INTERNAL_TO_DCQL_FORMAT[parsed.format] ?? parsed.format;
|
|
9697
9697
|
const decodedClaims = parsed.format === "mdoc" && parsed.namespacedClaims !== void 0 ? parsed.namespacedClaims : parsed.claims;
|
|
9698
|
+
const presentedCredentialQuery = query.credentials.find((c) => c.format === dcqlFormat) ?? query.credentials[0];
|
|
9698
9699
|
const decoded = {
|
|
9699
|
-
id:
|
|
9700
|
+
id: presentedCredentialQuery?.id ?? "presented",
|
|
9700
9701
|
format: dcqlFormat,
|
|
9701
9702
|
claims: decodedClaims
|
|
9702
9703
|
};
|
|
@@ -9817,8 +9818,12 @@ async function verifyAuthorizationResponse(envelope, query, options) {
|
|
|
9817
9818
|
if (queryIds.length > 1 || presentationCount > 1) {
|
|
9818
9819
|
throw new exports.MultipleCredentialsNotSupportedError(queryIds.length, presentationCount);
|
|
9819
9820
|
}
|
|
9820
|
-
const
|
|
9821
|
-
const
|
|
9821
|
+
const presentedQueryId = queryIds[0];
|
|
9822
|
+
const presentation = vpToken[presentedQueryId][0];
|
|
9823
|
+
const presentedCredentialQuery = query.credentials.find(
|
|
9824
|
+
(c) => c.id === presentedQueryId
|
|
9825
|
+
);
|
|
9826
|
+
const decodedPresentation = presentedCredentialQuery?.format === "mso_mdoc" && typeof presentation === "string" ? base64UrlToBytes(presentation) : presentation;
|
|
9822
9827
|
return verifyPresentation(decodedPresentation, query, options);
|
|
9823
9828
|
}
|
|
9824
9829
|
|
|
@@ -10451,7 +10456,7 @@ function equalBytes(a, b) {
|
|
|
10451
10456
|
|
|
10452
10457
|
// src/index.ts
|
|
10453
10458
|
init_errors();
|
|
10454
|
-
var VERSION = "0.10.
|
|
10459
|
+
var VERSION = "0.10.1";
|
|
10455
10460
|
/*! Bundled license information:
|
|
10456
10461
|
|
|
10457
10462
|
pvtsutils/build/index.es.js:
|