black fmt

This commit is contained in:
Taylor Wilsdon 2025-10-19 16:58:09 -04:00
parent ecbf74dbea
commit 4b74034967

View file

@ -486,9 +486,7 @@ class OAuthClientManager:
try: try:
payload = json.loads(body_text) payload = json.loads(body_text)
error = payload.get("error") error = payload.get("error")
error_description = payload.get( error_description = payload.get("error_description", "")
"error_description", ""
)
except json.JSONDecodeError: except json.JSONDecodeError:
error = None error = None
error_description = "" error_description = ""
@ -496,7 +494,11 @@ class OAuthClientManager:
error_description = body_text error_description = body_text
combined = f"{error or ''} {error_description}".lower() combined = f"{error or ''} {error_description}".lower()
if "invalid_client" in combined or "invalid client" in combined or "client id" in combined: if (
"invalid_client" in combined
or "invalid client" in combined
or "client id" in combined
):
log.warning( log.warning(
"OAuth client preflight detected invalid registration for %s: %s %s", "OAuth client preflight detected invalid registration for %s: %s %s",
client_info.client_id, client_info.client_id,
@ -577,9 +579,7 @@ class OAuthClientManager:
log.info("Re-registered OAuth client %s for MCP tool server", client_id) log.info("Re-registered OAuth client %s for MCP tool server", client_id)
return True return True
async def _ensure_valid_client_registration( async def _ensure_valid_client_registration(self, request, client_id: str) -> None:
self, request, client_id: str
) -> None:
if not client_id.startswith("mcp:"): if not client_id.startswith("mcp:"):
return return