Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JWK (RFC7517) #73

Open
lggomez opened this issue Aug 3, 2021 · 4 comments
Open

Add support for JWK (RFC7517) #73

lggomez opened this issue Aug 3, 2021 · 4 comments
Labels
enhancement New feature or request jwt-go: legacy

Comments

@lggomez
Copy link
Member

lggomez commented Aug 3, 2021

Migrated from dgrijalva/jwt-go#249:

dgrijalva commented on Mar 8, 2018

How far down the rabbit hole should we go with this?

See the issue thread for more details

@lggomez lggomez added enhancement New feature or request jwt-go: legacy labels Aug 3, 2021
@lggomez
Copy link
Member Author

lggomez commented Aug 4, 2021

This is a very large undertaking in the scope of this package IMO (as it has way more responsibilities including performing HTTP requests). Should we decide to implement this, I believe it should be done in a separate package using this one

@MicahParks
Copy link
Contributor

MicahParks commented Aug 17, 2021

I wrote a package for creating a jwt.Keyfunc. It's github.com/MicahParks/keyfunc.

This package does not create a JSON Web Key set (JWKs). It's only used for validating JWTs signed by a JSON Web Keys in the set. It can optionally grab and automatically refresh the JWKs via HTTP with a couple configuration options.

It's currently a separate package that supports a few github.com/dgrijalva/jwt-go forks including this one. Each fork must be explicitly supported as the signature of jwt.Keyfunc contains an argument that is a Go struct, *jwt.Token, not an interface implementation.

type Keyfunc func(*Token) (interface{}, error)

I'd be happy to contribute a modification of my keyfunc package to this repository, if requested. This would not bring the repository to fully supporting JWKs though, as I don't believe it has the ability to create one.

Here's the example from the original issue.

@greatcat-taihe
Copy link

It's useful parse apple sign in token.

@AlexanderYastrebov
Copy link
Contributor

AlexanderYastrebov commented Dec 3, 2021

It would be interesting to support JWKs url file as a key in the jwt tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request jwt-go: legacy
Projects
None yet
Development

No branches or pull requests

4 participants