Skip to content

3.14.0

Compare
Choose a tag to compare
@vimalloc vimalloc released this 07 Dec 00:35

In this release we are modifying how decoded tokens work, so that this extension can be more easily used by other JWT providers (#212). The important changes in this release are:

  • added the JWT_DECODE_AUDIENCE configuration option, for using the aud claim in JWTs
  • Change the decode_key_callback() function to now take the unverified headers as well as the unverified claims as arguments. If you have existing code that only takes one argument, it will still work, but you will see a depreciation warning when it is called. You should update your callback to take a second parameter to fix that. As an example decode_key(claims) would become decode_key(claims, headers).
  • If the jti claim doesn't exist in a token, it will now be set to None in the decoded dictionary instead of raising an error
  • If the type claim doesn't exist in a token, it will be marked as an access token and 'type': 'access' will be set in the decoded dictionary
  • If the fresh claim doesn't exist in a token, it will be marked as a non-fresh token and 'fresh': False will be set in the decoded dictionary

Many thanks to @acrossen for making this release possible!