Skip to content

Commit

Permalink
Fix for issue #862 - ignore invalid keys in a jwks. (#863)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Waterson <tim.waterson@risilience.com>
  • Loading branch information
timw6n and Tim Waterson committed May 9, 2023
1 parent abeeacb commit 6a27341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jwt/api_jwk.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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


Expand Down Expand Up @@ -94,7 +94,7 @@ def __init__(self, keys: list[JWKDict]) -> None:
for key in keys:
try:
self.keys.append(PyJWK(key))
except PyJWKError:
except PyJWTError:
# skip unusable keys
continue

Expand Down

0 comments on commit 6a27341

Please sign in to comment.