mirror of
https://github.com/Tivix/django-rest-auth.git
synced 2024-12-02 13:53:43 +03:00
Adds JWT example to Readme
This commit is contained in:
parent
27226223f4
commit
fe06053abe
25
README.md
25
README.md
|
@ -18,20 +18,35 @@ Install package
|
|||
|
||||
Add `dj_rest_auth` app to INSTALLED_APPS in your django settings.py:
|
||||
|
||||
INSTALLED_APPS = (
|
||||
```python
|
||||
INSTALLED_APPS = (
|
||||
...,
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
...,
|
||||
'dj_rest_auth'
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
Add URL patterns
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
```python
|
||||
urlpatterns = [
|
||||
url(r'^dj-rest-auth/', include('dj_rest_auth.urls'))
|
||||
]
|
||||
]
|
||||
```
|
||||
|
||||
(Optional)
|
||||
|
||||
Use Http-Only cookies
|
||||
|
||||
```python
|
||||
REST_USE_JWT = True
|
||||
JWT_AUTH_COOKIE = 'jwt-auth'
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
### Documentation
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user