File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1919 " mcp:call-tools"
2020 ],
2121 "MCP_SERVER_CLIENT_ID" : " " ,
22- "MCP_SERVER_CLIENT_SECRET" : " "
22+ "MCP_SERVER_CLIENT_SECRET" : " " ,
23+ "TOKEN_EXCHANGE_SCOPE" : [
24+ " ofbiz:use-api"
25+ ]
2326}
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ const AUTHZ_SERVER_BASE_URL = configData.AUTHZ_SERVER_BASE_URL;
4242const SCOPES_SUPPORTED = configData . SCOPES_SUPPORTED ;
4343const MCP_SERVER_CLIENT_ID = configData . MCP_SERVER_CLIENT_ID ;
4444const MCP_SERVER_CLIENT_SECRET = configData . MCP_SERVER_CLIENT_SECRET ;
45+ const TOKEN_EXCHANGE_SCOPE = configData . TOKEN_EXCHANGE_SCOPE || [ ] ;
4546// Server configuration
4647const SERVER_PORT = configData . SERVER_PORT ;
4748const RATE_LIMIT_WINDOW_MS = configData . RATE_LIMIT_WINDOW_MS || 60000 ; // default 1 minute
@@ -229,7 +230,7 @@ async function performTokenExchange(subjectToken: string): Promise<string | null
229230 subject_token : subjectToken ,
230231 subject_token_type : "urn:ietf:params:oauth:token-type:access_token" ,
231232 requested_token_type : "urn:ietf:params:oauth:token-type:access_token" ,
232- scope : "ofbiz:use-api" ,
233+ scope : TOKEN_EXCHANGE_SCOPE . join ( ' ' ) ,
233234 resource : BACKEND_API_RESOURCE ,
234235 audience : BACKEND_API_AUDIENCE
235236 } ) ;
You can’t perform that action at this time.
0 commit comments