@openid4vc/openid4vp 0.3.0-alpha-20250404180358 → 0.3.0-alpha-20250415153554

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 CHANGED
@@ -1046,7 +1046,7 @@ async function fetchJarRequestObject(options) {
1046
1046
  }
1047
1047
  const response = await (0, import_utils13.createFetcher)(fetch)(requestUri, {
1048
1048
  method,
1049
- body: method === "POST" ? (0, import_utils13.objectToQueryParams)(wallet.metadata ?? {}) : void 0,
1049
+ body: method === "post" ? (0, import_utils13.objectToQueryParams)(wallet.metadata ?? {}) : void 0,
1050
1050
  headers: {
1051
1051
  Accept: `${import_utils13.ContentType.OAuthAuthorizationRequestJwt}, ${import_utils13.ContentType.Jwt};q=0.9, text/plain`,
1052
1052
  "Content-Type": import_utils13.ContentType.XWwwFormUrlencoded
@@ -1082,11 +1082,11 @@ async function verifyJarRequest(options) {
1082
1082
  const jarRequestParams = validateJarRequestParams(options);
1083
1083
  const sendBy = jarRequestParams.request ? "value" : "reference";
1084
1084
  const clientIdentifierScheme = jarRequestParams.client_id ? zClientIdScheme.safeParse(jarRequestParams.client_id.split(":")[0]).data : "web-origin";
1085
- const method = jarRequestParams.request_uri_method ?? "GET";
1086
- if (method !== "GET" && method !== "POST") {
1085
+ const method = jarRequestParams.request_uri_method ?? "get";
1086
+ if (method !== "get" && method !== "post") {
1087
1087
  throw new import_oauth217.Oauth2ServerErrorResponseError({
1088
1088
  error: import_oauth217.Oauth2ErrorCodes.InvalidRequestUriMethod,
1089
- error_description: "Invalid request_uri_method. Must be GET or POST."
1089
+ error_description: `Invalid request_uri_method. Must be 'get' or 'post'.`
1090
1090
  });
1091
1091
  }
1092
1092
  const requestObject = jarRequestParams.request ?? await fetchJarRequestObject({