Fix Request type extension to not use namespacing
This commit is contained in:
parent
5d7bc7a035
commit
85e3cadc6f
1 changed files with 7 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue