Skip to content

Return 401 with WWW-Authenticate for expired upstream tokens#3984

Open
jhrozek wants to merge 1 commit intomainfrom
upstream-refresh/0-middleware-401
Open

Return 401 with WWW-Authenticate for expired upstream tokens#3984
jhrozek wants to merge 1 commit intomainfrom
upstream-refresh/0-middleware-401

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Mar 3, 2026

When upstream tokens are expired or missing, return a clear 401 with WWW-Authenticate header instead of silently passing the request through with an invalid token.

Related: #3914

When upstream tokens are expired or missing, return a clear 401 with
WWW-Authenticate header instead of silently passing the request through
with an invalid token.

Related: #3914
@github-actions github-actions bot added the size/S Small PR: 100-299 lines changed label Mar 3, 2026
@jhrozek jhrozek requested a review from tgrunnagle March 3, 2026 23:03
@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.56%. Comparing base (c46ae47) to head (64c2f40).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3984   +/-   ##
=======================================
  Coverage   68.56%   68.56%           
=======================================
  Files         437      437           
  Lines       44662    44673   +11     
=======================================
+ Hits        30621    30630    +9     
  Misses      11657    11657           
- Partials     2384     2386    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant