Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility to Django Debug Toolbar #53

Open
Rastopapola opened this issue Nov 13, 2020 · 0 comments
Open

Incompatibility to Django Debug Toolbar #53

Rastopapola opened this issue Nov 13, 2020 · 0 comments

Comments

@Rastopapola
Copy link
Contributor

Description

Django-simple-sso seems to be incompatible to the django-debug-toolbar project.

An error is thrown in the ddt middleware, once a client application tries to authenticate a user against the server machine, where the ddt is added to the middlewares.

Reason

The request body contains the signed json content. Ddt always tries to encode this JSON for further analysis, I guess. Due to the structure of the content like

{"x": "y"}.greatSignature

a JsonDecodeError is thrown, since this is no proper json.

Solutions

  1. No solution, just add the hint on the README, that for development (ddt is/should only be used for dev phase) the django debug toolbar needs to be deactivated, when the sso functionality will be used/tested
  2. Refactor the sign-checking functionality into a middleware component, which needs to live at an early stage of the MIDDLEWARE list in the settings.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant