Skip to content

Incompatibility to Django Debug Toolbar #53

@Rastopapola

Description

@Rastopapola

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions