flask-jwt
flask-jwt copied to clipboard
JWT (JSON Web Tokens) for Flask applications
When passing `{'id': 'someId'}` into the `_default_jwt_payload_handler` it raises an exception. The problem is in this expression: `identity = getattr(identity, 'id') or identity['id']` https://github.com/mattupstate/flask-jwt/blob/master/flask_jwt/__init__.py#L53 It must be: `identity = getattr(identity,...
This change is realized because of next error: ``` identity = getattr(identity, 'id') or identity['id'] AttributeError: 'dict' object has no attribute 'id' ``` Generated when the variable identity is a...
Seems related to https://github.com/jpadilla/pyjwt/issues/529 Getting this error after the new dependency resolver on pip 20.3.
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...
Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/ ```...
I was curious to know if anyone has figured out how you would mock `jwt_required` decorator. In my unittests I would prefer not having to authenticate with my application. I...
There are multiple sources on the internet suggesting that the value of the expiration date is milliseconds since epoch. For this reason in my client side code I assumed this,...
If the attribute 'id' does not exist, do not use it. Use the item 'id' instead. Fixes https://github.com/mattupstate/flask-jwt/issues/115
If I replace the token with an SPACE (" ") , I got this index out of range error. If I sent a singel other character everything works corecct and...