jazzband/djangorestframework-simplejwt — reverse-engineered prompt
Reverse engineered prompt
Build me a reusable Python package for Django REST Framework that adds simple JSON Web Token authentication. I want developers to be able to install it, add it to a Django project, and protect API endpoints so users can authenticate with a token instead of a normal session cookie. Include clear setup instructions, sensible default settings, and a small example showing how a client gets a token and uses it on later API calls.
It should validate tokens on requests, return normal REST Framework style errors when a token is missing or bad, and fit cleanly into Django settings without making people write a lot of custom code.
Please include tests for the main behavior and documentation that can be published online. Keep the design focused and maintainable, like a library people could actually use in real projects. If you need exact current Django or REST Framework details, look them up online.
Want more depth? Deep Reverse