@phake/mcp 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1759,7 +1759,7 @@ function buildUnauthorizedChallenge(args) {
|
|
|
1759
1759
|
return {
|
|
1760
1760
|
status: 401,
|
|
1761
1761
|
headers: {
|
|
1762
|
-
"WWW-Authenticate": `Bearer realm="MCP",
|
|
1762
|
+
"WWW-Authenticate": `Bearer realm="MCP", resource_metadata="${resourceMd}"`,
|
|
1763
1763
|
"Mcp-Session-Id": args.sid
|
|
1764
1764
|
},
|
|
1765
1765
|
body: {
|
|
@@ -2941,6 +2941,12 @@ function attachDiscoveryRoutes(router, config) {
|
|
|
2941
2941
|
const metadata = protectedResourceMetadata(here, sid);
|
|
2942
2942
|
return jsonResponse(metadata);
|
|
2943
2943
|
});
|
|
2944
|
+
router.get("/.well-known/oauth-protected-resource/*", async (request) => {
|
|
2945
|
+
const here = new URL(request.url);
|
|
2946
|
+
const sid = here.searchParams.get("sid") ?? undefined;
|
|
2947
|
+
const metadata = protectedResourceMetadata(here, sid);
|
|
2948
|
+
return jsonResponse(metadata);
|
|
2949
|
+
});
|
|
2944
2950
|
}
|
|
2945
2951
|
|
|
2946
2952
|
// src/adapters/http-worker/routes.oauth.ts
|
package/dist/index.js
CHANGED
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
withCancellation,
|
|
83
83
|
withCors,
|
|
84
84
|
workerDiscoveryStrategy
|
|
85
|
-
} from "./index-
|
|
85
|
+
} from "./index-qmejk5tj.js";
|
|
86
86
|
// src/shared/config/env.ts
|
|
87
87
|
function parseBoolean(value) {
|
|
88
88
|
return String(value || "false").toLowerCase() === "true";
|