Skip to content

Commit 84860f8

Browse files
committed
merge with recent branch
1 parent e80c285 commit 84860f8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/mcp/client/auth.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ def _add_auth_header(self, request: httpx.Request) -> None:
549549
"""Add authorization header to request if we have valid tokens."""
550550
if self.context.current_tokens and self.context.current_tokens.access_token:
551551
request.headers["Authorization"] = f"Bearer {self.context.current_tokens.access_token}"
552+
552553
async def async_auth_flow(self, request: httpx.Request) -> AsyncGenerator[httpx.Request, httpx.Response]:
553554
"""HTTPX auth flow integration."""
554555
async with self.context.lock:
@@ -585,9 +586,7 @@ async def async_auth_flow(self, request: httpx.Request) -> AsyncGenerator[httpx.
585586
self._select_scopes(response)
586587

587588
# Step 3: Discover OAuth metadata (with fallback for legacy servers)
588-
discovery_urls = self._get_discovery_urls(
589-
self.context.auth_server_url or self.context.server_url
590-
)
589+
discovery_urls = self._get_discovery_urls(self.context.auth_server_url or self.context.server_url)
591590
for url in discovery_urls:
592591
oauth_metadata_request = self._create_oauth_metadata_request(url)
593592
oauth_metadata_response = yield oauth_metadata_request

0 commit comments

Comments
 (0)