Skip to content

YegorDB/django-channels-auth-token-middlewares

Repository files navigation

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

  1. $ pip install channels-auth-token-middlewares
  2. 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