/** * OAuth Middleware * * Route dispatcher for all OAuth endpoints. Registered via * scope.server.http() before the MCP and webhook middlewares. * * Routes (MCP OAuth 2.1 — separate from @harperfast/oauth's /oauth/* Resource): * GET /.well-known/oauth-protected-resource/ → per-KB resource metadata * GET /.well-known/oauth-authorization-server → auth server metadata * POST /mcp-auth/register → DCR * GET /mcp-auth/authorize → login page * POST /mcp-auth/authorize → credential validation + redirect * POST /mcp-auth/token → code exchange / refresh * GET /mcp-auth/jwks → public key set */ import type { HarperRequest } from '../types.ts'; type MiddlewareFn = (request: HarperRequest, next: (req: HarperRequest) => Promise) => Promise; /** * Create the OAuth middleware for Harper's scope.server.http(). */ export declare function createOAuthMiddleware(): MiddlewareFn; export {}; //# sourceMappingURL=middleware.d.ts.map