Skip to content

Instantly share code, notes, and snippets.

@laclaro
Created April 17, 2020 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laclaro/4885e338c4897358bb05e7526eb51e87 to your computer and use it in GitHub Desktop.
Save laclaro/4885e338c4897358bb05e7526eb51e87 to your computer and use it in GitHub Desktop.
privacyidea_error_500_jwt
[2020-04-17 17:44:36,067][13845][139848312690496][INFO][privacyidea.lib.auditmodules.loggeraudit:85] {"action": "POST /auth", "action_detail": "", "administrator": "admin", "client": "127.0.0.1", "client_user_agent": null, "info": "internal admin", "policies": "", "privacyidea_server": "localhost:5000", "realm": null, "success": true, "timestamp": "2020-04-17T15:44:36.067535", "user": ""}
[2020-04-17 17:44:36,067][13845][139848312690496][DEBUG][privacyidea.api.lib.utils:254] Can not get param: No JSON object could be decoded
[2020-04-17 17:44:36,069][13845][139848312690496][DEBUG][privacyidea.api.before_after:90] End handling of request u'/auth?'
[2020-04-17 17:44:36,072][13845][139848312690496][DEBUG][privacyidea.api.before_after:84] Begin handling of request u'/token/?'
[2020-04-17 17:44:36,073][13845][139848312690496][ERROR][privacyidea.app:1892] Exception on /token/ [GET]
Traceback (most recent call last):
File "/home/henning/Dokumente/Dev/test/venv2/local/lib/python2.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/henning/Dokumente/Dev/test/venv2/local/lib/python2.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/henning/Dokumente/Dev/test/venv2/local/lib/python2.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/henning/Dokumente/Dev/test/venv2/local/lib/python2.7/site-packages/flask/app.py", line 1948, in full_dispatch_request
rv = self.preprocess_request()
File "/home/henning/Dokumente/Dev/test/venv2/local/lib/python2.7/site-packages/flask/app.py", line 2242, in preprocess_request
rv = func()
File "/home/henning/Dokumente/Dev/test/privacyidea/api/auth.py", line 379, in decorated_function
check_auth_token(required_role=["user", "admin"])
File "/home/henning/Dokumente/Dev/test/privacyidea/api/auth.py", line 399, in check_auth_token
r = verify_auth_token(auth_token, required_role)
File "/home/henning/Dokumente/Dev/test/privacyidea/api/lib/utils.py", line 292, in verify_auth_token
headers = jwt.get_unverified_header(auth_token)
File "/home/henning/Dokumente/Dev/test/venv2/local/lib/python2.7/site-packages/jwt/api_jws.py", line 166, in get_unverified_header
headers = self._load(jwt)[2]
File "/home/henning/Dokumente/Dev/test/venv2/local/lib/python2.7/site-packages/jwt/api_jws.py", line 183, in _load
raise DecodeError('Not enough segments')
DecodeError: Not enough segments
[2020-04-17 17:44:36,091][13845][139848312690496][INFO][privacyidea.lib.utils:1213] We are not able to determine the privacyidea version number.
[2020-04-17 17:44:36,091][13845][139848312690496][DEBUG][privacyidea.api.lib.utils:254] Can not get param: No JSON object could be decoded
[2020-04-17 17:44:36,093][13845][139848312690496][DEBUG][privacyidea.api.lib.utils:254] Can not get param: No JSON object could be decoded
[2020-04-17 17:44:36,095][13845][139848312690496][DEBUG][privacyidea.api.before_after:90] End handling of request u'/token/?'
@laclaro
Copy link
Author

laclaro commented Apr 17, 2020

same error with Python 3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment