mirror of
https://github.com/samanhappy/mcphub.git
synced 2025-12-24 02:39:19 -05:00
Add OAuth support for upstream MCP servers (#381)
Co-authored-by: samanhappy <samanhappy@gmail.com>
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
// Mock openid-client before importing services
|
||||
jest.mock('openid-client', () => ({
|
||||
discovery: jest.fn(),
|
||||
dynamicClientRegistration: jest.fn(),
|
||||
ClientSecretPost: jest.fn(() => jest.fn()),
|
||||
ClientSecretBasic: jest.fn(() => jest.fn()),
|
||||
None: jest.fn(() => jest.fn()),
|
||||
calculatePKCECodeChallenge: jest.fn(),
|
||||
randomPKCECodeVerifier: jest.fn(),
|
||||
buildAuthorizationUrl: jest.fn(),
|
||||
authorizationCodeGrant: jest.fn(),
|
||||
refreshTokenGrant: jest.fn(),
|
||||
}));
|
||||
|
||||
import { Server } from 'http';
|
||||
import { AppServer } from '../../src/server.js';
|
||||
import { TestServerHelper } from '../utils/testServerHelper.js';
|
||||
|
||||
Reference in New Issue
Block a user