MicahParks / keyfunc

Create a jwt.Keyfunc for JWT parsing with a JWK Set or given cryptographic keys (like HMAC) in Golang.
Apache License 2.0
274 stars 45 forks source link

Question: Why is there an ErrMultipleJWKSSize Error #87

Closed Robbilie closed 1 year ago

Robbilie commented 1 year ago

I am curious why there is such an error. I built an application that accepts one or multiple jwks urls and I need to build around this due to this error :/

MicahParks commented 1 year ago

Thank you for making this issue, @Robbilie.

My initial thought is there is a technical reason I made this limitation. Perhaps I instead made this decision to discourage people from using MultipleJWKS because it's less efficient, but the difference shouldn't be noticeable. I'm reading through the code now. If there's no technical reason for this limitation, I may change it from 2 to 1.

MicahParks commented 1 year ago

It looks like there is no technical limitation. @Robbilie, the behavior has changed to what you expect in release v2.0.2.

Robbilie commented 1 year ago

Much appreciated, one less if statement in my code then :P