-
Couldn't load subscription status.
- Fork 1.3k
feat: add defaultAlg param #426
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
Conversation
|
cc @Nextra |
|
This would certainly make using the I have a question that I didn't quite find an obvious answer to in the code: Prior to the change, did |
|
@Nextra the value of I am not sure how this could be exploited by anyone. I agree that it's strange that "alg" is optional in the first place, but I assume it's because many JWKS's have a known algorithm type, and so it's unnecessary to define it twice. |
|
The way I could see it as being useful is if one JWK were to be usable for decoding all variants of the respective algorithm, so passing I don't know if that makes any sense. |
|
We no longer use an array of "allowed algorithms", because the keys must be tied to an algorithm when they're used to verify the JWT. So to me, your suggestion does not make sense. |
|
Thought as much. Thanks for the change! |
Add parameter to
JWK::parseKeySetandJWK::parseKeyto prevent "missing alg" error.See https://github.com/firebase/php-jwt/pull/376/files#r861654996