honojs / hono

Web framework built on Web Standards
https://hono.dev
MIT License
20.59k stars 601 forks source link

Support JWKs validation #3658

Open JoaquinGimenez1 opened 2 weeks ago

JoaquinGimenez1 commented 2 weeks ago

What is the feature you are proposing?

JSON Web Key Sets are becoming more and more common these days. While Hono offers a JWT validation middleware it would be very nice to extend the current middleware to also validate JWTs that are signed with a public key. This should help any hono application that uses Cloudflare Zero Trust Access/Okta/other solutions.

Cloudflare Ref: https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/validating-json/

oussamasf commented 2 weeks ago

@EdamAme-x I guess the functions used to implement JWKS that are imported from the jose package can't be used in the codebase, as everything must be implemented from scratch?