Skip to content

Conversation

@pyup-bot
Copy link
Contributor

This PR updates flask_jwt_extended from 3.15.0 to 3.16.0.

Changelog

3.16.0

This release changes how the  `jwt.expired_token_loader` callback function works. Before this release the callback function took no arguments. Now it will take one argument which is the decoded contents of the expired token. This lets you customize the expired token callback based on the token that was received. For example:

python
Old way
jwt.expired_token_loader
def old_expired_callback():
 return jsonify(foo='bar'), 401

New way
jwt.expired_token_loader
def old_expired_callback(expired_token):
 if expired_token['type'] == 'access':
     return jsonify(foo='bar'), 401
 else:
     return jsonify(foo='baz'), 401


**The old way will still work**, updating to this version will not break your software out from under you. You will however receive a deprecation warning when using that way. To fix this, simply add an addition argument to your callback function for the expired token.
Links

@pyup-bot
Copy link
Contributor Author

pyup-bot commented Feb 5, 2019

Closing this in favor of #42

@pyup-bot pyup-bot closed this Feb 5, 2019
@perewall perewall deleted the pyup-update-flask_jwt_extended-3.15.0-to-3.16.0 branch February 5, 2019 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants