|
return user_response.json() |
This line tries to decode the response content as JSON, which is one of the ways this endpoint may be implemented. The other way is that it responds with a JWT, having a Content-Type header of application/jwt;charset=utf-8 and that fails to decode as JSON, as the JWT itself needs to be processed.
Environment details:
- OS: Arch Linux
- Python: 3.10
- Django: 3.2 LTS
- mozilla-django-oidc: 3.0.0
How to reproduce:
- Use an
OIDC_OP_USER_ENDPOINT that responds with a JWT
- Authenticate using OIDC
- Observe
JSONDecodeError crash