UNPKG

mcp-use

Version:

Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.

19 lines 798 B
/** * OAuth Middleware * * Creates bearer authentication middleware for Hono that validates * JWT tokens and attaches user information to the request context. */ import type { Context, Next } from "hono"; import type { OAuthProvider } from "./providers/types.js"; /** * Create bearer authentication middleware for a given OAuth provider * * @param provider - The OAuth provider to use for token verification * @param baseUrl - The base URL of the server (for WWW-Authenticate header) * @returns Hono middleware function */ export declare function createBearerAuthMiddleware(provider: OAuthProvider, baseUrl?: string): (c: Context, next: Next) => Promise<(Response & import("hono").TypedResponse<{ error: string; }, 401, "json">) | undefined>; //# sourceMappingURL=middleware.d.ts.map