django-channels-auth-token-middlewares
django-channels-auth-token-middlewares copied to clipboard
Django Channels auth token middlewares
Django Channels auth token middlewares
Provides Django REST framework token authentication middleware, Simple JWT middleware and easily extendable middlewares to work with auth tokens placed in request headers, cookie and query string.
Requirements
- Python>=3.6
- Channels>=3
Install
$ pip install channels-auth-token-middlewares- Add app name to
INSTALLED_APPS
INSTALLED_APPS = [
# base django apps (django.contrib.auth is required)
# other apps this one depends on (like rest_framework if it's necessary)
'channels_auth_token_middlewares',
# custom apps
]
Tutorial
Explore
Docs
Explore
Tests
Requirements
- Docker>=19
- docker-compose>=1.25
Usage
Run
$ docker-compose -f docker-compose.tests.yml up
Clean
$ docker-compose -f docker-compose.tests.yml down