Skip to content

Commit 83e8d11

Browse files
committed
fix: Use new discovery URLs method
1 parent c4745c2 commit 83e8d11

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

e2e_tests/python/automated_oauth.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import httpx
1414

1515
from mcp.client.auth import OAuthClientProvider, TokenStorage
16+
from mcp.client.auth.utils import build_oauth_authorization_server_metadata_discovery_urls
1617
from mcp.client.streamable_http import streamablehttp_client, MCP_PROTOCOL_VERSION
1718
from mcp.shared.auth import (
1819
OAuthClientInformationFull,
@@ -190,8 +191,10 @@ async def perform_client_credentials_flow(self) -> None:
190191

191192
async def _discover_oauth_metadata(self) -> None:
192193
"""Discover OAuth metadata using upstream MCP SDK discovery logic."""
193-
# Use the inherited _get_discovery_urls method from parent class
194-
discovery_urls = self._get_discovery_urls()
194+
195+
discovery_urls = build_oauth_authorization_server_metadata_discovery_urls(
196+
self.context.auth_server_url, self.context.server_url
197+
)
195198

196199
async with httpx.AsyncClient() as client:
197200
for metadata_url in discovery_urls:

0 commit comments

Comments
 (0)