feat(core): add host validation to GoogleCredentialProvider (#5962)

Co-authored-by: Brian Ray <62354532+emeryray2002@users.noreply.github.com>
This commit is contained in:
cornmander
2025-08-11 12:40:30 -04:00
committed by GitHub
parent b0b12af2ce
commit aa5c80dec4
3 changed files with 73 additions and 13 deletions

View File

@@ -568,7 +568,7 @@ describe('mcp-client', () => {
const transport = await createTransport(
'test-server',
{
httpUrl: 'http://test-server',
httpUrl: 'http://test.googleapis.com',
authProviderType: AuthProviderType.GOOGLE_CREDENTIALS,
oauth: {
scopes: ['scope1'],
@@ -587,7 +587,7 @@ describe('mcp-client', () => {
const transport = await createTransport(
'test-server',
{
url: 'http://test-server',
url: 'http://test.googleapis.com',
authProviderType: AuthProviderType.GOOGLE_CREDENTIALS,
oauth: {
scopes: ['scope1'],
@@ -615,7 +615,7 @@ describe('mcp-client', () => {
false,
),
).rejects.toThrow(
'No URL configured for Google Credentials MCP server',
'URL must be provided in the config for Google Credentials provider',
);
});
});