@bedrock/vc-delivery 5.3.4 → 5.3.5
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/lib/oid4/http.js +13 -4
- package/package.json +1 -1
package/lib/oid4/http.js
CHANGED
|
@@ -62,8 +62,17 @@ export async function createRoutes({
|
|
|
62
62
|
authorizationResponse: `${openIdRoute}/client/authorization/response`
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
// urlencoded body parser
|
|
66
|
-
const
|
|
65
|
+
// urlencoded body parser
|
|
66
|
+
const urlencodedSmall = bodyParser.urlencoded({
|
|
67
|
+
// (extended=true for rich JSON-like representation)
|
|
68
|
+
extended: true
|
|
69
|
+
});
|
|
70
|
+
const urlencodedLarge = bodyParser.urlencoded({
|
|
71
|
+
// (extended=true for rich JSON-like representation)
|
|
72
|
+
extended: true,
|
|
73
|
+
// allow larger payloads
|
|
74
|
+
limit: '10MB'
|
|
75
|
+
});
|
|
67
76
|
|
|
68
77
|
/* Note: The well-known metadata paths for the OID4VCI spec have been
|
|
69
78
|
specified in at least two different ways over time, including
|
|
@@ -142,7 +151,7 @@ export async function createRoutes({
|
|
|
142
151
|
app.post(
|
|
143
152
|
routes.token,
|
|
144
153
|
cors(),
|
|
145
|
-
|
|
154
|
+
urlencodedSmall,
|
|
146
155
|
validate({bodySchema: openIdTokenBody}),
|
|
147
156
|
getConfigMiddleware,
|
|
148
157
|
getExchange,
|
|
@@ -316,7 +325,7 @@ export async function createRoutes({
|
|
|
316
325
|
app.post(
|
|
317
326
|
routes.authorizationResponse,
|
|
318
327
|
cors(),
|
|
319
|
-
|
|
328
|
+
urlencodedLarge,
|
|
320
329
|
validate({bodySchema: openIdAuthorizationResponseBody()}),
|
|
321
330
|
getConfigMiddleware,
|
|
322
331
|
getExchange,
|