Skip to content

Conversation

JoaquinGimenez1
Copy link
Contributor

@JoaquinGimenez1 JoaquinGimenez1 commented Jul 11, 2025

RFC: Enable JWK middleware to read from custom header, similar to the cookie.

This will provider more flexibility for different use cases like Cloudflare Zero Trust Access that sends the assertion token on Cf-Access-Jwt-Assertion header.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

@JoaquinGimenez1 JoaquinGimenez1 changed the title RFC Update jwk to read from custom header RFC (jwk) Update jwk to read from custom header Jul 11, 2025
Copy link

codecov bot commented Jul 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.62%. Comparing base (cf0e01e) to head (bdb95f1).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #4279   +/-   ##
=======================================
  Coverage   91.62%   91.62%           
=======================================
  Files         170      170           
  Lines       10836    10837    +1     
  Branches     3225     3159   -66     
=======================================
+ Hits         9928     9929    +1     
  Misses        907      907           
  Partials        1        1           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yusukebe
Copy link
Member

@JoaquinGimenez1

Thank you for the PR. Can you add proper tests?

@JoaquinGimenez1
Copy link
Contributor Author

Will add tests and open a proper PR, thanks for the feedback @yusukebe

@JoaquinGimenez1 JoaquinGimenez1 changed the title RFC (jwk) Update jwk to read from custom header feat(jwk): Add custom headerName to JWK middleware Jul 13, 2025
@JoaquinGimenez1 JoaquinGimenez1 requested a review from yusukebe July 13, 2025 22:40
@JoaquinGimenez1
Copy link
Contributor Author

Okay, all should be good to go now.

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

Hi @JoaquinGimenez1

Thanks! Looks good to me. It's a new feature, so basically it will be introduced in the next minor version, but it's a slight change. So, it may be included in the patch release. I'll decide it later.

@yusukebe yusukebe changed the base branch from main to next August 7, 2025 00:39
@yusukebe yusukebe merged commit 820d59c into honojs:next Aug 7, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants