fastify-txstate 3.2.3 → 3.2.4
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/unified-auth.d.ts +1 -1
- package/lib/unified-auth.js +1 -0
- package/package.json +1 -1
package/lib/unified-auth.d.ts
CHANGED
|
@@ -58,5 +58,5 @@ declare class TxStateUAuthContext extends Context {
|
|
|
58
58
|
authFromPayload(payload: JWTPayload): Promise<FastifyTxStateAuthInfo>;
|
|
59
59
|
}
|
|
60
60
|
export declare function unifiedAuthenticate(req: FastifyRequest, ContextClass?: typeof TxStateUAuthContext): Promise<FastifyTxStateAuthInfo | undefined>;
|
|
61
|
-
export declare function unifiedAuthenticateAll(req: FastifyRequest, ContextClass?: typeof TxStateUAuthContext): Promise<
|
|
61
|
+
export declare function unifiedAuthenticateAll(req: FastifyRequest, ContextClass?: typeof TxStateUAuthContext): Promise<FastifyTxStateAuthInfo>;
|
|
62
62
|
export {};
|
package/lib/unified-auth.js
CHANGED
|
@@ -141,5 +141,6 @@ async function unifiedAuthenticateAll(req, ContextClass = TxStateUAuthContext) {
|
|
|
141
141
|
const auth = await ctx.waitForAuth();
|
|
142
142
|
if (!(auth === null || auth === void 0 ? void 0 : auth.username.length))
|
|
143
143
|
throw new Error('All requests require authentication.');
|
|
144
|
+
return auth;
|
|
144
145
|
}
|
|
145
146
|
exports.unifiedAuthenticateAll = unifiedAuthenticateAll;
|