Skip to content

Commit

Permalink
chore(deps): bump pyjwt[crypto] from 2.8.0 to 2.9.0 (#16378)
Browse files Browse the repository at this point in the history
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Fiedler <miketheman@gmail.com>
  • Loading branch information
dependabot[bot] and miketheman authored Aug 7, 2024
1 parent a0a6509 commit a75c68c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions requirements/main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1717,9 +1717,9 @@ pygments==2.18.0 \
# via
# readme-renderer
# rich
pyjwt[crypto]==2.8.0 \
--hash=sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de \
--hash=sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320
pyjwt[crypto]==2.9.0 \
--hash=sha256:3b02fb0f44517787776cf48f2ae25d8e14f300e6d7545a4315cee571a415e850 \
--hash=sha256:7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c
# via
# -r requirements/main.in
# pyjwt
Expand Down
7 changes: 3 additions & 4 deletions tests/unit/oidc/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,15 +972,14 @@ def test_decodes_token_jwk_roundtrip(self):

assert decoded == {"foo": "bar"}

def test_decodes_token_typeerror_on_pyjwk(self):
def test_decodes_token_pyjwk(self):
privkey_jwk = PyJWK.from_json(algorithms.RSAAlgorithm.to_jwk(self._privkey))
pubkey_jwk = PyJWK.from_json(algorithms.RSAAlgorithm.to_jwk(self._pubkey))

token = jwt.encode({"foo": "bar"}, privkey_jwk.key, algorithm="RS256")
decoded = jwt.decode(token, pubkey_jwk, algorithms=["RS256"])

# Passing a `PyJWK` directly into `jwt.decode` does not work.
with pytest.raises(TypeError, match=r"Expecting a PEM-formatted key\."):
jwt.decode(token, pubkey_jwk, algorithms=["RS256"])
assert decoded == {"foo": "bar"}

def test_decode_strict_aud(self):
token = jwt.encode(
Expand Down

0 comments on commit a75c68c

Please sign in to comment.