Added JWTs and API protection

This commit is contained in:
Ivan Nikolskiy 2025-07-19 17:53:16 +02:00
parent 793cb3d83b
commit 20bd4d8ebc

View File

@ -14,6 +14,7 @@
* [2. Include URLs](#2-include-urls) * [2. Include URLs](#2-include-urls)
* [3. Use the callback decorator](#3-use-the-callback-decorator) * [3. Use the callback decorator](#3-use-the-callback-decorator)
* [4. Use the login button tag](#4-use-the-login-button-tag) * [4. Use the login button tag](#4-use-the-login-button-tag)
* [5. Protect API](#5-protect-api)
* [⚙️ Advanced Usage](#⚙️-advanced-usage) * [⚙️ Advanced Usage](#⚙️-advanced-usage)
* [Custom callback response handling](#custom-callback-response-handling) * [Custom callback response handling](#custom-callback-response-handling)
@ -131,7 +132,7 @@ Or use `{% hopid_login_url %}` manually in `href`.
### 5. Protect API ### 5. Protect API
```django ```python
from django.http import JsonResponse from django.http import JsonResponse
from django_hopid.decorators import hopid_protected from django_hopid.decorators import hopid_protected