Guy-Lev commented on code in PR #64219:
URL: https://github.com/apache/airflow/pull/64219#discussion_r2997734214
##########
airflow-core/src/airflow/api_fastapi/core_api/security.py:
##########
@@ -140,6 +140,13 @@ async def get_user(
token_str = bearer_credentials.credentials
elif oauth_token:
token_str = oauth_token
+ elif request.headers.get("authorization"):
Review Comment:
If the header starts with Bearer, FastAPI’s HTTPBearer already parses it
upstream, so the first if should handle it. This elif would only run for
non-Bearer formats.
That said, I can add an explicit `not auth_header.lower().startswith("bearer
")` check to make that obvious without needing to trace the upstream logic.
WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]