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