@openid4vc/oauth2 0.3.1-alpha-20251121092859 → 0.3.1-alpha-20251124151046

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 CHANGED
@@ -6,12 +6,16 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
- key = keys[i];
11
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
- get: ((k) => from[k]).bind(null, key),
13
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
- });
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
15
19
  }
16
20
  return to;
17
21
  };
@@ -1407,7 +1411,7 @@ var Oauth2ResourceUnauthorizedError = class Oauth2ResourceUnauthorizedError exte
1407
1411
  this.wwwAuthenticateHeaders = Array.isArray(wwwAuthenticateHeaders) ? wwwAuthenticateHeaders : [wwwAuthenticateHeaders];
1408
1412
  }
1409
1413
  static fromHeaderValue(value) {
1410
- return new Oauth2ResourceUnauthorizedError(void 0, (0, __openid4vc_utils.parseWwwAuthenticateHeader)(value).map(({ scheme, payload: { error, error_description, scope,...additionalPayload } }) => ({
1414
+ return new Oauth2ResourceUnauthorizedError(void 0, (0, __openid4vc_utils.parseWwwAuthenticateHeader)(value).map(({ scheme, payload: { error, error_description, scope, ...additionalPayload } }) => ({
1411
1415
  scheme,
1412
1416
  error: Array.isArray(error) ? error.join(",") : error ?? void 0,
1413
1417
  error_description: Array.isArray(error_description) ? error_description.join(",") : error_description ?? void 0,
@@ -1695,7 +1699,7 @@ const zAccessTokenRequest = zod.default.intersection(zod.default.object({
1695
1699
  }).loose(), zod.default.object({
1696
1700
  tx_code: zod.default.optional(zod.default.string()),
1697
1701
  user_pin: zod.default.optional(zod.default.string())
1698
- }).loose().refine(({ tx_code, user_pin }) => !tx_code || !user_pin || user_pin === tx_code, { message: `If both 'tx_code' and 'user_pin' are present they must match` }).transform(({ tx_code, user_pin,...rest }) => {
1702
+ }).loose().refine(({ tx_code, user_pin }) => !tx_code || !user_pin || user_pin === tx_code, { message: `If both 'tx_code' and 'user_pin' are present they must match` }).transform(({ tx_code, user_pin, ...rest }) => {
1699
1703
  return {
1700
1704
  ...rest,
1701
1705
  ...tx_code ?? user_pin ? { tx_code: tx_code ?? user_pin } : {}