Skip to content

Commit

Permalink
Fix for issue jpadilla#862 - ignore invalid keys in a jwks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Waterson committed Mar 2, 2023
1 parent 5a2a6b6 commit f60ee4b
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, Optional

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 f60ee4b

Please sign in to comment.