Add PRM metadata to www-authenticate
This commit is contained in:
parent
927d34c0d1
commit
077fed19b9
1 changed files with 6 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { BearerAuthMiddlewareOptions, requireBearerAuth } from "@modelcontextprotocol/sdk/server/auth/middleware/bearerAuth.js";
|
||||
import { AuthRouterOptions, mcpAuthRouter } from "@modelcontextprotocol/sdk/server/auth/router.js";
|
||||
import { AuthRouterOptions, getOAuthProtectedResourceMetadataUrl, mcpAuthRouter } from "@modelcontextprotocol/sdk/server/auth/router.js";
|
||||
import cors from "cors";
|
||||
import express from "express";
|
||||
import path from "path";
|
||||
|
|
@ -145,7 +145,8 @@ const dearerAuthMiddlewareOptions: BearerAuthMiddlewareOptions = {
|
|||
// verifyAccessToken(token: string): Promise<AuthInfo>;
|
||||
verifier: {
|
||||
verifyAccessToken: authProvider.verifyAccessToken.bind(authProvider),
|
||||
}
|
||||
},
|
||||
resourceMetadataUrl: getOAuthProtectedResourceMetadataUrl(BASE_URI),
|
||||
}
|
||||
|
||||
app.use(mcpAuthRouter(options));
|
||||
|
|
|
|||
Loading…
Reference in a new issue