Skip to content

[BUG] JWT_Token Expiration #121

@gebauerm

Description

@gebauerm

Token expires without reaching expiration limit.

Error Message:

flask | 130.149.22.192 - - [26/Nov/2021 12:33:23] "GET /tasks HTTP/1.1" 200 -
flask | 130.149.22.192 - - [26/Nov/2021 12:33:26] "GET /tasks HTTP/1.1" 200 -
flask | 130.149.22.192 - - [26/Nov/2021 12:33:26] "GET /static/css/style.css HTTP/1.1" 304 -
flask | [2021-11-26 12:36:16,482] ERROR in app: Exception on /api/task/619b89736e606a6f57e4aa9e/annotation/json [POST]
flask | Traceback (most recent call last):
flask | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
flask | rv = self.dispatch_request()
flask | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
flask | return self.view_functionsrule.endpoint
flask | File "/usr/local/lib/python3.8/site-packages/flask_restx/api.py", line 375, in wrapper
flask | resp = resource(args, **kwargs)
flask | File "/usr/local/lib/python3.8/site-packages/flask/views.py", line 89, in view
flask | return self.dispatch_request(args, kwargs)
flask | File "/usr/local/lib/python3.8/site-packages/flask_restx/resource.py", line 44, in dispatch_request
flask | resp = meth(*args, kwargs)
flask | File "/usr/local/lib/python3.8/site-packages/flask_restx/marshalling.py", line 248, in wrapper
flask | resp = f(args, *kwargs)
flask | File "/usr/local/lib/python3.8/site-packages/flask_jwt_extended/view_decorators.py", line 120, in decorator
flask | verify_jwt_in_request(optional, fresh, refresh, locations)
flask | File "/usr/local/lib/python3.8/site-packages/flask_jwt_extended/view_decorators.py", line 68, in verify_jwt_in_request
flask | jwt_data, jwt_header, jwt_location = _decode_jwt_from_request(
flask | File "/usr/local/lib/python3.8/site-packages/flask_jwt_extended/view_decorators.py", line 286, in _decode_jwt_from_request
flask | decoded_token = decode_token(encoded_token, csrf_token)
flask | File "/usr/local/lib/python3.8/site-packages/flask_jwt_extended/utils.py", line 122, in decode_token
flask | return jwt_manager._decode_jwt_from_config(encoded_token, csrf_value, allow_expired)
flask | File "/usr/local/lib/python3.8/site-packages/flask_jwt_extended/jwt_manager.py", line 536, in _decode_jwt_from_config
flask | return _decode_jwt(kwargs, allow_expired=allow_expired)
flask | File "/usr/local/lib/python3.8/site-packages/flask_jwt_extended/tokens.py", line 87, in _decode_jwt
flask | decoded_token = jwt.decode(
flask | File "/usr/local/lib/python3.8/site-packages/jwt/api_jwt.py", line 119, in decode
flask | decoded = self.decode_complete(jwt, key, algorithms, options, kwargs)
flask | File "/usr/local/lib/python3.8/site-packages/jwt/api_jwt.py", line 106, in decode_complete
flask | self._validate_claims(payload, merged_options, **kwargs)
flask | File "/usr/local/lib/python3.8/site-packages/jwt/api_jwt.py", line 142, in _validate_claims
flask | self._validate_exp(payload, now, leeway)
flask | File "/usr/local/lib/python3.8/site-packages/jwt/api_jwt.py", line 177, in _validate_exp
flask | raise ExpiredSignatureError("Signature has expired")
flask | jwt.exceptions.ExpiredSignatureError: Signature has expired
flask | 130.149.22.192 - - [26/Nov/2021 12:36:16] "POST /api/task/619b89736e606a6f57e4aa9e/annotation/json HTTP/1.1" 500 -

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions