django-mds
django-mds copied to clipboard
For discussion: handle JSON Oauth2 authent along with urlencoded
There are two ways to retrieve a OAuth2 token (with our Django toolkit and in general AFAIK):
-
The URI encoding we currently use: https://github.com/jazzband/django-oauth-toolkit/blob/2fdb0fea4efec9bc79708f0ac1b4b24884f26f97/oauth2_provider/oauth2_backends.py#L74
-
JSON in request body: https://github.com/jazzband/django-oauth-toolkit/blob/2fdb0fea4efec9bc79708f0ac1b4b24884f26f97/oauth2_provider/oauth2_backends.py#L176
As we wrote a MDS indexer that uses the latter, it may be a useful addition, which could be nice for external services also (like providers).
If we want to support both, it seems like we need our custom oauth2 backend and/or open a PR in django-auth-toolkit.