File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
3+ *
4+ * WSO2 LLC. licenses this file to you under the Apache License,
5+ * Version 2.0 (the "License"); you may not use this file except
6+ * in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing,
12+ * software distributed under the License is distributed on an
13+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+ * KIND, either express or implied. See the License for the
15+ * specific language governing permissions and limitations
16+ * under the License.
17+ */
18+
19+ import { McpAuthServer } from './McpAuthServer.js' ;
20+
21+ const PORT : string = process . env [ `PORT` ] || '3000' ;
22+ const { BASE_URL } = process . env ;
23+ const MCP_RESOURCE : string = process . env [ 'MCP_RESOURCE' ] || `http://localhost:${ PORT } /mcp` ;
24+
25+ if ( ! BASE_URL ) {
26+ throw new Error ( 'BASE_URL is missing. Please set it in the .env file.' ) ;
27+ }
28+
29+ const configuredAuthServer : McpAuthServer = new McpAuthServer ( {
30+ baseUrl : BASE_URL ,
31+ issuer : `${ BASE_URL } /oauth2/token` ,
32+ resource : MCP_RESOURCE ,
33+ } ) ;
34+
35+ export { configuredAuthServer } ;
Original file line number Diff line number Diff line change 1717 */
1818
1919export { McpAuthServer } from './McpAuthServer' ;
20+ export { configuredAuthServer } from './auth-wrapper.js' ;
You can’t perform that action at this time.
0 commit comments