import { RequestHandler } from 'express'; import express from 'express'; import { Options as RateLimitOptions } from 'express-rate-limit'; import { OAuthServer } from '../OAuthServer.js'; export type AuthenticationHandlerOptions = { provider: OAuthServer; /** * Rate limiting configuration for the authorization endpoint. * Set to false to disable rate limiting for this endpoint. */ rateLimit?: Partial | false; /** * Extract the authenticated user ID from the request. */ getUser: (req: express.Request) => Promise | string; }; export declare function authenticateHandler({ provider, rateLimit: rateLimitConfig, getUser }: AuthenticationHandlerOptions): RequestHandler;