Skip to content

Commit 0d4c70f

Browse files
committed
Change backend token name to be compliant with OAuth specifications
1 parent 5cafea7 commit 0d4c70f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"BACKEND_API_AUDIENCE": "https://demo-stable.ofbiz.apache.org",
44
"BACKEND_API_RESOURCE": "https://demo-stable.ofbiz.apache.org",
55
"BACKEND_API_AUTH": "https://demo-stable.ofbiz.apache.org/rest/auth/token",
6-
"BACKEND_AUTH_TOKEN": "",
6+
"BACKEND_ACCESS_TOKEN": "",
77
"AUTHZ_SERVER_BASE_URL": "",
88
"MCP_SERVER_BASE_URL": "",
99
"SERVER_PORT": 3000,

src/server-remote.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const USER_AGENT = 'OFBiz-MCP-server';
3636
export const BACKEND_API_BASE = configData.BACKEND_API_BASE;
3737
const BACKEND_API_AUDIENCE = configData.BACKEND_API_AUDIENCE;
3838
const BACKEND_API_RESOURCE = configData.BACKEND_API_RESOURCE;
39-
const BACKEND_AUTH_TOKEN = () => getConfigData().BACKEND_AUTH_TOKEN;
39+
const BACKEND_ACCESS_TOKEN = () => getConfigData().BACKEND_ACCESS_TOKEN;
4040
const MCP_SERVER_BASE_URL = configData.MCP_SERVER_BASE_URL;
4141
const MCP_SERVER_DNS_REBINDING_PROTECTION_ALLOWED_HOSTS =
4242
configData.MCP_SERVER_DNS_REBINDING_PROTECTION_ALLOWED_HOSTS || [];
@@ -363,7 +363,7 @@ const handleMcpRequest = async (req: express.Request, res: express.Response) =>
363363
setDownstreamToken(sessionId, downstreamToken);
364364
} else {
365365
// No downstream token obtained from token exchange, fallback to static token
366-
downstreamToken = BACKEND_AUTH_TOKEN();
366+
downstreamToken = BACKEND_ACCESS_TOKEN();
367367
}
368368
}
369369
if (downstreamToken) {

0 commit comments

Comments
 (0)