From c6f9f39b4c2d3eafa0f99738b968ea1ff0fc2f56 Mon Sep 17 00:00:00 2001 From: Srikari12 Date: Thu, 8 Jan 2026 12:45:15 +0530 Subject: [PATCH] docs: clarify HTTP Basic realm is optional --- docs/de/docs/advanced/security/http-basic-auth.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/de/docs/advanced/security/http-basic-auth.md b/docs/de/docs/advanced/security/http-basic-auth.md index f906ecd92..39c84375d 100644 --- a/docs/de/docs/advanced/security/http-basic-auth.md +++ b/docs/de/docs/advanced/security/http-basic-auth.md @@ -105,3 +105,7 @@ So ist Ihr Anwendungscode, dank der Verwendung von `secrets.compare_digest()`, v Nachdem Sie festgestellt haben, dass die Anmeldeinformationen falsch sind, geben Sie eine `HTTPException` mit dem Statuscode 401 zurück (derselbe, der auch zurückgegeben wird, wenn keine Anmeldeinformationen angegeben werden) und fügen den Header `WWW-Authenticate` hinzu, damit der Browser die Anmeldeaufforderung erneut anzeigt: {* ../../docs_src/security/tutorial007_an_py39.py hl[26:30] *} +!!! note + According to updated HTTP authentication specifications (RFC 7235), + the `realm` parameter in HTTP Basic authentication is optional. + FastAPI follows this behavior and does not require a `realm` to be set.