File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
mcp-express/src/middlewares Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,9 @@ export default function bearerAuthMiddleware(options: McpAuthOptions) {
5050 const issuer : string | undefined = options ?. issuer ;
5151 const endpoints :
5252 | {
53+ authorize ?: string | undefined ;
5354 jwks ?: string | undefined ;
55+ token ?: string | undefined ;
5456 }
5557 | undefined = options ?. endpoints ;
5658
Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ export default function generateAuthorizationServerMetadata(
3131 const { issuer, endpoints} = options ;
3232
3333 const metadata : AuthorizationServerMetadata = {
34- authorization_endpoint : ` ${ options . baseUrl } ${ endpoints ?. authorize ?? ' /oauth2/authorize' } `,
34+ authorization_endpoint : endpoints ?. authorize ?? ` ${ options . baseUrl } /oauth2/authorize`,
3535 issuer : `${ issuer } ` ,
3636 response_types_supported : [ 'code' ] ,
37- token_endpoint : ` ${ options . baseUrl } ${ endpoints ?. token ?? ' /oauth2/token' } `,
37+ token_endpoint : endpoints ?. token ?? ` ${ options . baseUrl } /oauth2/token`,
3838 } ;
3939
4040 // TODO: Check this further.
@@ -59,7 +59,7 @@ export default function generateAuthorizationServerMetadata(
5959 }
6060
6161 // TODO: Check this further.
62- metadata . jwks_uri = ` ${ options . baseUrl } ${ endpoints ?. jwks ?? ' /oauth/jwks' } `;
62+ metadata . jwks_uri = endpoints ?. jwks ?? ` ${ options . baseUrl } /oauth/jwks`;
6363
6464 return metadata ;
6565}
You can’t perform that action at this time.
0 commit comments