Skip to content

Remove JSONOAuthLibCore (deprecated in 3.4.1) #1773

Description

@dopry

JSONOAuthLibCore (OAUTH2_PROVIDER["OAUTH2_BACKEND_CLASS"] = "oauth2_provider.oauth2_backends.JSONOAuthLibCore") makes the OAuth token, introspection, and revocation endpoints read application/json request bodies instead of application/x-www-form-urlencoded. Those endpoints are defined by spec to use form-urlencoded bodies:

Reading JSON on these endpoints is non-standard: it makes the server non-interoperable with spec-compliant OAuth clients/libraries for no capability gain (any client can send a form-encoded body). It's a long-standing compatibility shim and was effectively undocumented.

It is deprecated in 3.4.1 — instantiating it now emits a DeprecationWarning. This issue tracks its removal in 4.0:

  • Remove the JSONOAuthLibCore class from oauth2_provider/oauth2_backends.py
  • Remove its tests (tests/test_oauth2_backends.py::TestJSONOAuthLibCoreBackend)
  • Add a "Removed" CHANGELOG entry and note it in the upgrade/migration docs

Context: originally surfaced via #613 (JSON introspection), which was closed wontfix for the same RFC 7662 reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions