From 3ba539209089dd175b66c25743918d1d556c61a7 Mon Sep 17 00:00:00 2001 From: AnshMNSoni Date: Tue, 13 Jan 2026 11:00:17 +0530 Subject: [PATCH] remove duplicate make_authenticate_headers --- fastapi/security/http.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fastapi/security/http.py b/fastapi/security/http.py index ffd2ee1ad..a8ddf0c16 100644 --- a/fastapi/security/http.py +++ b/fastapi/security/http.py @@ -118,13 +118,10 @@ class HTTPBasic(HTTPBase): self.realm = realm # keep for OpenAPI compatibility self.auto_error = auto_error - def make_authenticate_headers(self) -> dict[str, str]: - # FastAPI behavior: do NOT include realm in header - return {"WWW-Authenticate": "Basic"} - def make_authenticate_headers(self) -> dict[str, str]: return {"WWW-Authenticate": "Basic"} + async def __call__( # type: ignore self, request: Request