@forklaunch/core 0.14.12 → 0.14.14
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 -1
- package/lib/http/index.d.ts +1 -1
- package/lib/http/index.js +2 -1
- package/lib/http/index.js.map +1 -1
- package/lib/http/index.mjs +2 -1
- package/lib/http/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/http/index.d.mts
CHANGED
@@ -475,7 +475,7 @@ type ExpressLikeGlobalAuthOptions<SV extends AnySchemaValidator, SessionSchema e
|
|
475
475
|
/**
|
476
476
|
* Function to extract a set of roles from the JWT payload and request.
|
477
477
|
*/
|
478
|
-
surfaceRoles?:
|
478
|
+
surfaceRoles?: (payload: JWTPayload & SessionSchema, req?: ForklaunchRequest<SV, Record<string, string>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, string, SessionSchema>) => Set<string> | Promise<Set<string>>;
|
479
479
|
};
|
480
480
|
/**
|
481
481
|
* Schema-aware version of ExpressLikeGlobalAuthOptions.
|
package/lib/http/index.d.ts
CHANGED
@@ -475,7 +475,7 @@ type ExpressLikeGlobalAuthOptions<SV extends AnySchemaValidator, SessionSchema e
|
|
475
475
|
/**
|
476
476
|
* Function to extract a set of roles from the JWT payload and request.
|
477
477
|
*/
|
478
|
-
surfaceRoles?:
|
478
|
+
surfaceRoles?: (payload: JWTPayload & SessionSchema, req?: ForklaunchRequest<SV, Record<string, string>, Record<string, unknown>, Record<string, unknown>, Record<string, unknown>, string, SessionSchema>) => Set<string> | Promise<Set<string>>;
|
479
479
|
};
|
480
480
|
/**
|
481
481
|
* Schema-aware version of ExpressLikeGlobalAuthOptions.
|
package/lib/http/index.js
CHANGED
@@ -193,7 +193,7 @@ function isBasicAuthMethod(maybeBasicAuthMethod) {
|
|
193
193
|
|
194
194
|
// src/http/guards/isHmacMethod.ts
|
195
195
|
function isHmacMethod(maybeHmacMethod) {
|
196
|
-
return typeof maybeHmacMethod === "object" && maybeHmacMethod !== null && "
|
196
|
+
return typeof maybeHmacMethod === "object" && maybeHmacMethod !== null && "hmac" in maybeHmacMethod && maybeHmacMethod.hmac != null;
|
197
197
|
}
|
198
198
|
|
199
199
|
// src/http/guards/isJwtAuthMethod.ts
|
@@ -539,6 +539,7 @@ async function parseRequestAuth(req, res, next) {
|
|
539
539
|
req._globalOptions?.()?.auth
|
540
540
|
) ?? [];
|
541
541
|
if (error != null) {
|
542
|
+
req.openTelemetryCollector.error(error, message);
|
542
543
|
res.type("text/plain");
|
543
544
|
res.status(error).send(message);
|
544
545
|
return;
|