From 8dadeddb357a94c8f0ed4c544de75c5485793d44 Mon Sep 17 00:00:00 2001 From: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com> Date: Tue, 2 Sep 2025 19:40:44 -0700 Subject: [PATCH] Update headers type --- docs/docs/concepts/auth.md | 2 +- docs/docs/how-tos/auth/custom_auth.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/concepts/auth.md b/docs/docs/concepts/auth.md index 09526f223..875e112c9 100644 --- a/docs/docs/concepts/auth.md +++ b/docs/docs/concepts/auth.md @@ -112,7 +112,7 @@ auth = Auth() @auth.authenticate async def authenticate(headers: dict) -> Auth.types.MinimalUserDict: # Validate credentials (e.g., API key, JWT token) - api_key = headers.get("x-api-key") + api_key = headers.get(b"x-api-key") if not api_key or not is_valid_key(api_key): raise Auth.exceptions.HTTPException( status_code=401, diff --git a/docs/docs/how-tos/auth/custom_auth.md b/docs/docs/how-tos/auth/custom_auth.md index e7d0f2f24..76dc11bf0 100644 --- a/docs/docs/how-tos/auth/custom_auth.md +++ b/docs/docs/how-tos/auth/custom_auth.md @@ -43,7 +43,7 @@ To leverage custom authentication and access user-level metadata in your deploym @auth.authenticate # (1)! async def authenticate(headers: dict) -> Auth.types.MinimalUserDict: - api_key = headers.get("x-api-key") + api_key = headers.get(b"x-api-key") if not api_key or not is_valid_key(api_key): raise Auth.exceptions.HTTPException(status_code=401, detail="Invalid API key")