summaryrefslogtreecommitdiff
path: root/packages/core/src/mcp/oauth-provider.test.ts
diff options
context:
space:
mode:
authorMikhail Aksenov <[email protected]>2025-08-06 00:02:16 +0200
committerGitHub <[email protected]>2025-08-05 22:02:16 +0000
commitdadf05809c4978455a646ab4ef95421fbe758657 (patch)
treeffb318b766aec91014d90492ad5a2a2077954d24 /packages/core/src/mcp/oauth-provider.test.ts
parent29c3825604fdc82b483902bf79f204673e2dfdae (diff)
feat: mcp - support audiences for OAuth2 (#5265)
Diffstat (limited to 'packages/core/src/mcp/oauth-provider.test.ts')
-rw-r--r--packages/core/src/mcp/oauth-provider.test.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/core/src/mcp/oauth-provider.test.ts b/packages/core/src/mcp/oauth-provider.test.ts
index 74eb42c0..3991aecc 100644
--- a/packages/core/src/mcp/oauth-provider.test.ts
+++ b/packages/core/src/mcp/oauth-provider.test.ts
@@ -48,6 +48,7 @@ describe('MCPOAuthProvider', () => {
tokenUrl: 'https://auth.example.com/token',
scopes: ['read', 'write'],
redirectUri: 'http://localhost:7777/oauth/callback',
+ audiences: ['https://api.example.com'],
};
const mockToken: MCPOAuthToken = {
@@ -722,6 +723,7 @@ describe('MCPOAuthProvider', () => {
expect(capturedUrl!).toContain('code_challenge_method=S256');
expect(capturedUrl!).toContain('scope=read+write');
expect(capturedUrl!).toContain('resource=https%3A%2F%2Fauth.example.com');
+ expect(capturedUrl!).toContain('audience=https%3A%2F%2Fapi.example.com');
});
it('should correctly append parameters to an authorization URL that already has query params', async () => {