Repository navigation
feat: add defaultAlg param - #426
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