@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 +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1383,7 +1383,7 @@ var Oauth2ResourceUnauthorizedError = class Oauth2ResourceUnauthorizedError exte
|
|
|
1383
1383
|
this.wwwAuthenticateHeaders = Array.isArray(wwwAuthenticateHeaders) ? wwwAuthenticateHeaders : [wwwAuthenticateHeaders];
|
|
1384
1384
|
}
|
|
1385
1385
|
static fromHeaderValue(value) {
|
|
1386
|
-
return new Oauth2ResourceUnauthorizedError(void 0, parseWwwAuthenticateHeader(value).map(({ scheme, payload: { error, error_description, scope
|
|
1386
|
+
return new Oauth2ResourceUnauthorizedError(void 0, parseWwwAuthenticateHeader(value).map(({ scheme, payload: { error, error_description, scope, ...additionalPayload } }) => ({
|
|
1387
1387
|
scheme,
|
|
1388
1388
|
error: Array.isArray(error) ? error.join(",") : error ?? void 0,
|
|
1389
1389
|
error_description: Array.isArray(error_description) ? error_description.join(",") : error_description ?? void 0,
|
|
@@ -1671,7 +1671,7 @@ const zAccessTokenRequest = z$1.intersection(z$1.object({
|
|
|
1671
1671
|
}).loose(), z$1.object({
|
|
1672
1672
|
tx_code: z$1.optional(z$1.string()),
|
|
1673
1673
|
user_pin: z$1.optional(z$1.string())
|
|
1674
|
-
}).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
|
|
1674
|
+
}).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 }) => {
|
|
1675
1675
|
return {
|
|
1676
1676
|
...rest,
|
|
1677
1677
|
...tx_code ?? user_pin ? { tx_code: tx_code ?? user_pin } : {}
|