Skip to content
django-trench provides a set of REST API endpoints to supplement django-rest-framework with multi-factor authentication (MFA, 2FA). It supports both standard built-in authentication methods, as well as JWT (JSON Web Token).
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.tx Added Transifex translation tool to project (#27) Jan 11, 2019
docs Bumps version up to 0.2.2 May 21, 2019
examples/client Update token field name in testproject fronend app Jan 16, 2019
testproject
trench
.editorconfig Initial commit. Oct 23, 2018
.gitignore Added Transifex translation tool to project (#27) Jan 11, 2019
.travis.yml
AUTHORS Update AUTHORS Jan 11, 2019
CHANGELOG.rst Bumps version up to 0.2.2 May 21, 2019
LICENSE Add license Nov 23, 2018
MANIFEST.in Add locale directory to distribution package (#41) May 20, 2019
Makefile Initial commit. Oct 23, 2018
README.rst Update travis config (#48) May 21, 2019
codecov.yml Update codecov.yml Dec 14, 2018
setup.py
tox.ini

README.rst

django-trench

https://travis-ci.org/merixstudio/django-trench.svg?branch=master https://readthedocs.org/projects/django-trench/badge/?version=latest
django-trench provides a set of REST API endpoints to supplement django-rest-framework with multi-factor authentication (MFA, 2FA). It supports both standard built-in authentication methods, as well as JWT (JSON Web Token). django-trench follows the url pattern developed in djoser library and may act as its supplement.
We deliver a couple of sample secondary authentication methods including sending OTP based code by email, SMS/text as well as through 3rd party mobile apps or utilising YubiKey. Developers can easily add own auth backend supporting any communication channel.

Features

  • Easily plugable and compatible with django-rest-framework and djoser
  • Allows user to pick an additional authentication method from range of backends defined by a developer. Read more: backends
  • Comes out of a box with email, SMS, mobile apps and YubiKey support

Requirements

Supported versions

  • Python 3.4, 3.5, 3.6, 3.7
  • Django 1.11, 2.0, 2.1, 2.2
  • Django REST Framework 3.7, 3.8, 3.9
If you implement Token Based Authentication:
If you are going to use JWT authentication:
or

Quick Start

  1. Install the package using pip:
pip install django-trench

or add it to your requirements file.

  1. Add trench library to INSTALLED_APPS in your app settings file:
INSTALLED_APPS = (
    ...,
    'rest_framework',
    'rest_framework.authtoken',  # In case of implementing Token Based Authentication
    ...,
    'trench',
)
  1. Run migrations
Read further in: installation.

Translation

Trench uses Transifex service to translate our package into other languages.

We will appreciate your help with translation.

https://www.transifex.com/merixstudio/django-trench/dashboard/

Demo project

You can also check our live demo.

You can’t perform that action at this time.