Skip to content

[v3-3-test] Drop the redundant OAuth2 branch from get_user and collect_request_tokens (#72889) - #72943

Merged
vatsrahul1001 merged 1 commit into
v3-3-testfrom
backport-677b4ab-v3-3-test
Sep 11, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-3-testfrom
backport-677b4ab-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

HTTPBearer and OAuth2PasswordBearer both extract the same Authorization: Bearer header, so declaring both as dependencies produces the same string
twice. get_user had a dead branch for the OAuth2 side (the bearer branch
above it always matched first), and collect_request_tokens deduped the
duplicate anyway.

Keep oauth2_scheme declared as an unused parameter so the OpenAPI security
spec is unchanged and /docs still renders the OAuth2 password login form.
Only the runtime dead code goes.
(cherry picked from commit 677b4ab)

Co-authored-by: Pierre Jeambrun [email protected]

…t_request_tokens (#72889)

`HTTPBearer` and `OAuth2PasswordBearer` both extract the same `Authorization:
Bearer` header, so declaring both as dependencies produces the same string
twice. `get_user` had a dead branch for the OAuth2 side (the bearer branch
above it always matched first), and `collect_request_tokens` deduped the
duplicate anyway.

Keep `oauth2_scheme` declared as an unused parameter so the OpenAPI security
spec is unchanged and ``/docs`` still renders the OAuth2 password login form.
Only the runtime dead code goes.
(cherry picked from commit 677b4ab)

Co-authored-by: Pierre Jeambrun <[email protected]>
@vatsrahul1001
vatsrahul1001 merged commit d398324 into v3-3-test Sep 11, 2026
95 of 104 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-677b4ab-v3-3-test branch September 11, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants