Skip to content

Commit efecc7d

Browse files
committed
Use client_metadata to determine if 2LO should be used
1 parent aaf2cc7 commit efecc7d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/mcp/client/auth.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,7 @@ async def _handle_registration_response(self, response: httpx.Response) -> None:
320320

321321
async def _perform_authorization(self) -> httpx.Request:
322322
"""Perform the authorization flow."""
323-
if not self.context.client_info:
324-
raise OAuthFlowError("No client info available for authorization")
325-
326-
if "client_credentials" in self.context.client_info.grant_types:
323+
if "client_credentials" in self.context.client_metadata.grant_types:
327324
token_request = await self._exchange_token_client_credentials()
328325
return token_request
329326
else:

0 commit comments

Comments
 (0)