Skip to content

Commit 852eafc

Browse files
committed
Format client_auth.py
1 parent f577001 commit 852eafc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/mcp/server/auth/middleware/client_auth.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ async def authenticate_request(self, request: Request) -> OAuthClientInformation
106106
# hmac.compare_digest requires that both arguments are either bytes or a `str` containing
107107
# only ASCII characters. Since we do not control `request_client_secret`, we encode both
108108
# arguments to bytes.
109-
if not hmac.compare_digest(
110-
client.client_secret.encode(), request_client_secret.encode()
111-
):
109+
if not hmac.compare_digest(client.client_secret.encode(), request_client_secret.encode()):
112110
raise AuthenticationError("Invalid client_secret") # pragma: no cover
113111

114112
if client.client_secret_expires_at and client.client_secret_expires_at < int(time.time()):

0 commit comments

Comments
 (0)