jpadilla / pyjwt

JSON Web Token implementation in Python
https://pyjwt.readthedocs.io
MIT License
5.18k stars 690 forks source link

Add JWK support to JWT encode #979

Closed luhn closed 1 month ago

luhn commented 3 months ago

To round out my contributions, this PR adds JWK support to api_jws.encode and api_jwt.encode.

Most significant change is change of default algorithm to DEFAULT_ALGORITHM. This will resolve to the JWK algorithm if applicable, otherwise HS256.