Merge branch 'main' into request-auth-info

This commit is contained in:
Allen Zhou 2025-04-07 10:30:00 -07:00 • committed by GitHub
commit b5b322e859
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 105 additions and 53 deletions

View file

@ -31,6 +31,10 @@ describe("requireBearerAuth middleware", () => {
set: jest.fn().mockReturnThis(),
};
nextFunction = jest.fn();
jest.spyOn(console, 'error').mockImplementation(() => {});
})
afterEach(() => {
jest.clearAllMocks();
});

View file

@ -259,6 +259,11 @@ describe('MCP Auth Router', () => {
issuerUrl: new URL('https://auth.example.com')
};
app.use(mcpAuthRouter(options));
jest.spyOn(console, 'error').mockImplementation(() => {});
});
afterEach(() => {
jest.restoreAllMocks();
});
it('routes to authorization endpoint', async () => {

View file

@ -45,7 +45,7 @@ export class SSEServerTransport implements Transport {
this.res.writeHead(200, {
"Content-Type": "text/event-stream",
"Cache-Control": "no-cache",
"Cache-Control": "no-cache, no-transform",
Connection: "keep-alive",
});