Getting started

Available endpoints

  • /me/
  • /users/create/
  • /users/delete/
  • /users/activate/
  • /{{ User.USERNAME_FIELD }}/
  • /password/
  • /password/reset/
  • /password/reset/confirm/
  • /token/create/ (Token Based Authentication)
  • /token/destroy/ (Token Based Authentication)
  • /jwt/create/ (JSON Web Token Authentication)
  • /jwt/refresh/ (JSON Web Token Authentication)
  • /jwt/verify/ (JSON Web Token Authentication)

Supported authentication backends

Supported Python versions

  • Python 2.7
  • Python 3.4
  • Python 3.5
  • Python 3.6

Supported Django versions

  • Django 1.10
  • Django 1.11

Supported Django Rest Framework versions

  • Django Rest Framework 3.7

Installation

$ pip install -U djoser

If you are going to use JWT authentication, you will also need to install django-rest-framework-jwt with:

$ pip install -U djangorestframework-jwt

Configuration

Configure INSTALLED_APPS:

INSTALLED_APPS = (
    'django.contrib.auth',
    (...),
    'rest_framework',
    'djoser',
    (...),
)

Configure urls.py:

urlpatterns = [
    (...),
    url(r'^auth/', include('djoser.urls')),
]

HTTP Basic Auth strategy is assumed by default as Django Rest Framework does it. We strongly discourage and do not provide any explicit support for basic auth. You should customize your authentication backend as described in Authentication Backends.