Fix Request type extension to not use namespacing

This commit is contained in:
Justin Spahr-Summers 2025-02-18 13:18:50 +00:00
commit 85e3cadc6f
No known key found for this signature in database

View file

@ -13,16 +13,14 @@ export type ClientAuthenticationMiddlewareOptions = {
const ClientAuthenticatedRequestSchema = z.object({
client_id: z.string(),
client_secret: z.string().optional(),
})
});
declare global {
namespace Express {
interface Request {
/**
* The authenticated client for this request, if the `authenticateClient` middleware was used.
*/
client?: OAuthClientInformationFull;
}
declare module "express-serve-static-core" {
interface Request {
/**
* The authenticated client for this request, if the `authenticateClient` middleware was used.
*/
client?: OAuthClientInformationFull;
}
}