diff options
author | Tim Waterson <51910265+timw6n@users.noreply.github.com> | 2023-05-09 20:02:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 15:02:11 -0400 |
commit | 6a273419949b68ddccbe3867fd4bd8680cacf097 (patch) | |
tree | 2b41caa2bf30ae20f18c9f3734af8aa4039b4a5d | |
parent | abeeacb99a30a5c2ae60c1696bb7ead012405349 (diff) | |
download | pyjwt-6a273419949b68ddccbe3867fd4bd8680cacf097.tar.gz |
Fix for issue #862 - ignore invalid keys in a jwks. (#863)
Co-authored-by: Tim Waterson <tim.waterson@risilience.com>
-rw-r--r-- | jwt/api_jwk.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jwt/api_jwk.py b/jwt/api_jwk.py index dd876f7..456c7f4 100644 --- a/jwt/api_jwk.py +++ b/jwt/api_jwk.py @@ -5,7 +5,7 @@ import time from typing import Any from .algorithms import get_default_algorithms, has_crypto, requires_cryptography -from .exceptions import InvalidKeyError, PyJWKError, PyJWKSetError +from .exceptions import InvalidKeyError, PyJWKError, PyJWKSetError, PyJWTError from .types import JWKDict @@ -94,7 +94,7 @@ class PyJWKSet: for key in keys: try: self.keys.append(PyJWK(key)) - except PyJWKError: + except PyJWTError: # skip unusable keys continue |