Skip to content

Releases: jpadilla/pyjwt

2.8.0

18 Jul 19:59
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @juur made their first contribution in #891

Full Changelog: 2.7.0...2.8.0

2.7.0

09 May 20:05
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.6.0...2.7.0

2.6.0

24 Oct 14:25
7665aa6
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.5.0...2.6.0

2.5.0

17 Sep 13:57
c900610
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.4.0...2.5.0

2.4.0

12 May 18:57
Compare
Choose a tag to compare

Security

What's Changed

New Contributors

Full Changelog: 2.3.0...2.4.0

2.3.0

18 Oct 15:25
98620ab
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.2.0...2.3.0

2.2.0

06 Oct 22:31
6223ba1
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.1.0...2.2.0

2.1.0

28 Apr 12:06
79c23d7
Compare
Choose a tag to compare

Changelog

Changed

  • Allow claims validation without making JWT signature validation mandatory. #608

Fixed

  • Remove padding from JWK test data. #628
  • Make kty mandatory in JWK to be compliant with RFC7517. #624
  • Allow JWK without alg to be compliant with RFC7517. #624
  • Allow to verify with private key on ECAlgorithm, as well as on Ed25519Algorithm. #645

Added

  • Add caching by default to PyJWKClient #611
  • Add missing exceptions.InvalidKeyError to jwt module __init__ imports #620
  • Add support for ES256K algorithm #629
  • Add from_jwk() to Ed25519Algorithm #621
  • Add to_jwk() to Ed25519Algorithm #643
  • Export PyJWK and PyJWKSet #652

2.0.1

17 Jan 17:59
3993ce1
Compare
Choose a tag to compare

Changelog

Changed

  • Rename CHANGELOG.md to CHANGELOG.rst and include in docs #597

Fixed

  • Fix from_jwk() for all algorithms #598

v2.0.0

22 Dec 14:13
4823647
Compare
Choose a tag to compare

Highlights

Introduce better experience for JWKs

Introduce PyJWK, PyJWKSet, and PyJWKClient.

import jwt
from jwt import PyJWKClient

token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik5FRTFRVVJCT1RNNE16STVSa0ZETlRZeE9UVTFNRGcyT0Rnd1EwVXpNVGsxUWpZeVJrUkZRdyJ9.eyJpc3MiOiJodHRwczovL2Rldi04N2V2eDlydS5hdXRoMC5jb20vIiwic3ViIjoiYVc0Q2NhNzl4UmVMV1V6MGFFMkg2a0QwTzNjWEJWdENAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vZXhwZW5zZXMtYXBpIiwiaWF0IjoxNTcyMDA2OTU0LCJleHAiOjE1NzIwMDY5NjQsImF6cCI6ImFXNENjYTc5eFJlTFdVejBhRTJINmtEME8zY1hCVnRDIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.PUxE7xn52aTCohGiWoSdMBZGiYAHwE5FYie0Y1qUT68IHSTXwXVd6hn02HTah6epvHHVKA2FqcFZ4GGv5VTHEvYpeggiiZMgbxFrmTEY0csL6VNkX1eaJGcuehwQCRBKRLL3zKmA5IKGy5GeUnIbpPHLHDxr-GXvgFzsdsyWlVQvPX2xjeaQ217r2PtxDeqjlf66UYl6oY6AqNS8DH3iryCvIfCcybRZkc_hdy-6ZMoKT6Piijvk_aXdm7-QQqKJFHLuEqrVSOuBqqiNfVrG27QzAPuPOxvfXTVLXL2jek5meH6n-VWgrBdoMFH93QEszEDowDAEhQPHVs0xj7SIzA"
kid = "NEE1QURBOTM4MzI5RkFDNTYxOTU1MDg2ODgwQ0UzMTk1QjYyRkRFQw"
url = "https://dev-87evx9ru.auth0.com/.well-known/jwks.json"

jwks_client = PyJWKClient(url)
signing_key = jwks_client.get_signing_key_from_jwt(token)

data = jwt.decode(
    token,
    signing_key.key,
    algorithms=["RS256"],
    audience="https://expenses-api",
    options={"verify_exp": False},
)
print(data)

Support for JWKs containing ECDSA keys

Drop support for Python 2

Require cryptography >= 3

Drop support for PyCrypto and ECDSA

We've kept this around for a long time, mostly for environments that didn't allow installing cryptography.

Drop CLI

Dropped the included cli entry point.

Improve typings

We no longer need to use mypy Python 2 compatibility mode (comments)

Add support for Ed25519 / EdDSA

Changes

Thanks to all that helped made this release happen one way or another. Special shout out to @jdufresne for all the amazing work getting this project into tip-top shape.