@gavdi/cap-mcp 1.5.0 → 1.5.1

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.
Files changed (2) hide show
  1. package/lib/auth/utils.js +18 -9
  2. package/package.json +1 -1
package/lib/auth/utils.js CHANGED
@@ -282,16 +282,25 @@ function registerOAuthEndpoints(expressApp, credentials, kind) {
282
282
  registration_endpoint_auth_methods_supported: ["client_secret_basic"],
283
283
  });
284
284
  });
285
+ // BUG: This element has been commented out as a part of a hotfix for authorization flows.
286
+ // It should not be included again until further investigation has been done, but a patch will have to be released to remedy this.
287
+ // This is likely related to the fact that most MCP clients do not include application/json as their preferred response time when authenticating,
288
+ // causing issues when targeting SAP's XSUAA service, that will default to HTML.
289
+ //
285
290
  // RFC 9728: OAuth 2.0 Protected Resource Metadata endpoint
286
- expressApp.get("/.well-known/oauth-protected-resource", (req, res) => {
287
- const baseUrl = (0, host_resolver_1.buildPublicBaseUrl)(req);
288
- res.json({
289
- resource: baseUrl,
290
- authorization_servers: [credentials.url],
291
- bearer_methods_supported: ["header"],
292
- resource_documentation: `${baseUrl}/mcp/health`,
293
- });
294
- });
291
+ // expressApp.get(
292
+ // "/.well-known/oauth-protected-resource",
293
+ // (req: Request, res: Response): void => {
294
+ // const baseUrl = buildPublicBaseUrl(req);
295
+ //
296
+ // res.json({
297
+ // resource: baseUrl,
298
+ // authorization_servers: [credentials.url],
299
+ // bearer_methods_supported: ["header"],
300
+ // resource_documentation: `${baseUrl}/mcp/health`,
301
+ // });
302
+ // },
303
+ // );
295
304
  // OAuth Dynamic Client Registration discovery endpoint (GET)
296
305
  expressApp.get("/oauth/register", async (req, res) => {
297
306
  const baseUrl = (0, host_resolver_1.buildPublicBaseUrl)(req);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gavdi/cap-mcp",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "MCP Plugin for CAP",
5
5
  "keywords": [
6
6
  "MCP",