flask-jwt
flask-jwt copied to clipboard
Fails on authenticating dict based user
To reproduce this bug you can use this authenticate function:
def authenticate(username, password):
return {'id': '1', 'username': 'test', 'password': 'test'}
Trace:
File ".../lib/python3.5/site-packages/flask_jwt/__init__.py", line 53, in _default_jwt_payload_handler
identity = getattr(identity, 'id') or identity['id']
AttributeError: 'dict' object has no attribute 'id'
Coverage remained the same at 95.652% when pulling 030e870788f32db4cd7da0bb620b83cf39e547ed on menudoproblema:master into c27084114e258863b82753fc574a362cd6c62fcd on mattupstate:master.
Already fixed by #63 and so many others ;)
Updated after @dequis comment
@stephane I think you mean #63
Yes you're right