@openid4vc/openid4vp 0.3.0-alpha-20250322133827 → 0.3.0-alpha-20250322160039
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.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -987,13 +987,13 @@ function parseAuthorizationRequestVersion(request) {
|
|
|
987
987
|
var import_oauth215 = require("@openid4vc/oauth2");
|
|
988
988
|
var import_utils12 = require("@openid4vc/utils");
|
|
989
989
|
async function fetchJarRequestObject(options) {
|
|
990
|
-
const { requestUri, clientIdentifierScheme, method, wallet, fetch
|
|
990
|
+
const { requestUri, clientIdentifierScheme, method, wallet, fetch } = options;
|
|
991
991
|
let requestBody = wallet.metadata ? { wallet_metadata: wallet.metadata, wallet_nonce: wallet.nonce } : void 0;
|
|
992
992
|
if (requestBody?.wallet_metadata?.request_object_signing_alg_values_supported && clientIdentifierScheme === "redirect_uri") {
|
|
993
993
|
const { request_object_signing_alg_values_supported, ...rest } = requestBody.wallet_metadata;
|
|
994
994
|
requestBody = { ...requestBody, wallet_metadata: { ...rest } };
|
|
995
995
|
}
|
|
996
|
-
const response = await fetch(requestUri, {
|
|
996
|
+
const response = await (0, import_utils12.createFetcher)(fetch)(requestUri, {
|
|
997
997
|
method,
|
|
998
998
|
body: method === "POST" ? (0, import_utils12.objectToQueryParams)(wallet.metadata ?? {}) : void 0,
|
|
999
999
|
headers: {
|
|
@@ -1446,7 +1446,7 @@ var jarmAuthorizationResponseSend = (options) => {
|
|
|
1446
1446
|
return handleDirectPostJwt(responseEndpointUrl, jarmAuthorizationResponseJwt, callbacks);
|
|
1447
1447
|
};
|
|
1448
1448
|
async function handleDirectPostJwt(responseEndpoint, responseJwt, callbacks) {
|
|
1449
|
-
const response = await (
|
|
1449
|
+
const response = await (0, import_utils16.createFetcher)(callbacks.fetch)(responseEndpoint, {
|
|
1450
1450
|
method: "POST",
|
|
1451
1451
|
headers: { "Content-Type": import_utils16.ContentType.XWwwFormUrlencoded },
|
|
1452
1452
|
body: `response=${responseJwt}`
|
|
@@ -1473,11 +1473,11 @@ async function submitOpenid4vpAuthorizationResponse(options) {
|
|
|
1473
1473
|
"Failed to submit OpenId4Vp Authorization Response. No redirect_uri or response_uri provided."
|
|
1474
1474
|
);
|
|
1475
1475
|
}
|
|
1476
|
-
const fetch = callbacks.fetch
|
|
1476
|
+
const fetch = (0, import_utils17.createFetcher)(callbacks.fetch);
|
|
1477
1477
|
const encodedResponse = (0, import_utils18.objectToQueryParams)(authorizationResponsePayload);
|
|
1478
1478
|
const submissionResponse = await fetch(url, {
|
|
1479
1479
|
method: "POST",
|
|
1480
|
-
body: encodedResponse,
|
|
1480
|
+
body: encodedResponse.toString(),
|
|
1481
1481
|
headers: {
|
|
1482
1482
|
"Content-Type": import_utils17.ContentType.XWwwFormUrlencoded
|
|
1483
1483
|
}
|