Open antocaso opened 8 years ago
Server also crashes when no data is posted:
"[...]/flask_jwt/__init__.py", line 115, in _default_auth_request_handler
username = data.get(current_app.config.get('JWT_AUTH_USERNAME_KEY'), None)
AttributeError: 'NoneType' object has no attribute 'get'
Sending the "Content-Type: application/json" header with the request solved the problem for me.
This is a small issue: making a wrong request to the auth resource, like sending a form data instead of json data, an Internal Server Error occurs. I think that Bad Request may be a better response. I saw your code, _default_auth_request_handler method in details, but i didn't found the problem.