-
-
Notifications
You must be signed in to change notification settings - Fork 684
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
PyJWKSet reports the wrong exception for an empty key set #754
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Empty key sets give the wrong exception. The error is here:
pyjwt/jwt/api_jwk.py
Lines 80 to 84 in 24b29ad
When
keys
is the empty list,not keys
is true so the second check is never reached (unless somelist
subclass overrides__bool__
).Expected Result
Should raise
PyJWKSetError("The JWK Set did not contain any keys")
.Actual Result
Raises
PyJWKSetError("Invalid JWK Set value")
.Reproduction Steps
The text was updated successfully, but these errors were encountered: