@forklaunch/core 0.15.1-debug-hmac → 0.15.2
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/http/index.d.mts +1 -0
- package/lib/http/index.d.ts +1 -0
- package/lib/http/index.js +14 -11
- package/lib/http/index.js.map +1 -1
- package/lib/http/index.mjs +14 -11
- package/lib/http/index.mjs.map +1 -1
- package/package.json +5 -5
package/lib/http/index.mjs
CHANGED
@@ -326,13 +326,6 @@ async function checkAuthorizationToken(req, authorizationMethod, authorizationTo
|
|
326
326
|
const parsedTimestamp = parseHmacTokenPart(timestamp, "ts");
|
327
327
|
const parsedNonce = parseHmacTokenPart(nonce, "nonce");
|
328
328
|
const parsedSignature = parseHmacTokenPart(signature, "signature");
|
329
|
-
console.log(
|
330
|
-
"parseditems",
|
331
|
-
parsedKeyId,
|
332
|
-
parsedTimestamp,
|
333
|
-
parsedNonce,
|
334
|
-
parsedSignature
|
335
|
-
);
|
336
329
|
if (!parsedKeyId || !parsedTimestamp || !parsedNonce || !parsedSignature) {
|
337
330
|
return invalidAuthorizationTokenFormat;
|
338
331
|
}
|
@@ -1630,6 +1623,17 @@ var ForklaunchExpressLikeRouter = class _ForklaunchExpressLikeRouter {
|
|
1630
1623
|
}
|
1631
1624
|
return this;
|
1632
1625
|
}
|
1626
|
+
addRouterOptions(router) {
|
1627
|
+
router.routerOptions = {
|
1628
|
+
...this.routerOptions ?? {},
|
1629
|
+
...router.routerOptions ?? {}
|
1630
|
+
};
|
1631
|
+
router.routers.forEach((subRouter) => {
|
1632
|
+
this.addRouterOptions(
|
1633
|
+
subRouter
|
1634
|
+
);
|
1635
|
+
});
|
1636
|
+
}
|
1633
1637
|
use = (pathOrContractDetailsOrMiddlewareOrTypedHandler, contractDetailsOrMiddlewareOrTypedHandler, ...middlewareOrMiddlewareWithTypedHandler) => {
|
1634
1638
|
[
|
1635
1639
|
pathOrContractDetailsOrMiddlewareOrTypedHandler,
|
@@ -1638,10 +1642,9 @@ var ForklaunchExpressLikeRouter = class _ForklaunchExpressLikeRouter {
|
|
1638
1642
|
].forEach((arg) => {
|
1639
1643
|
if (isForklaunchRouter(arg)) {
|
1640
1644
|
this.routers.push(arg);
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
};
|
1645
|
+
this.addRouterOptions(
|
1646
|
+
arg
|
1647
|
+
);
|
1645
1648
|
}
|
1646
1649
|
});
|
1647
1650
|
return this.registerNestableMiddlewareHandler(
|