This control over the response is absolutely necessary when using libraries that automatically JSONify the return value of your views. For example, Flask-API and Flask-RESTful extensions expect views to return dictionaries. The extensions handle the "jsonification".
Without a means for overriding flask-jwt's response behavior, your token payload gets jsonified twice!
Coverage remained the same when pulling 465a22822de66d4dc0b63d7c52f609087a352351 on sloria:response-handler into ba5652b8544068f8d7fcb391f8a3cbbbca4741c9 on mattupstate:master.
Adds a
response_handler
hook that allows for custom formatting of the output response for the auth endpoint.Example
This control over the response is absolutely necessary when using libraries that automatically JSONify the return value of your views. For example, Flask-API and Flask-RESTful extensions expect views to return dictionaries. The extensions handle the "jsonification".
Without a means for overriding flask-jwt's response behavior, your token payload gets jsonified twice!