django-two-factor-auth

0.4.0 MIT/X Consortium License    
  UNRATED

  115 downloads

Full Two-Factor Authentication for Django

description

download

specs

Being built on top of the django.contrib.auth app, django-two-factor-auth is a Django application that provides a complete two-factor authentication implementation in Django.

Installation

Install it with pip:

 pip install django-two-factor-auth

Add 'two_factor' to the INSTALLED_APPS

INSTALLED_APPS = (
 ...
 'two_factor',
)


Configure the authentication backends like this:

AUTHENTICATION_BACKENDS = (
 'django.contrib.auth.backends.ModelBackend',
 'two_factor.auth_backends.TokenBackend',
 'two_factor.auth_backends.VerifiedComputerBackend',
)


Configure the login URL like this:

from django.core.urlresolvers import reverse_lazy
LOGIN_URL = reverse_lazy('tf:login')


Add the URL routes like this:

urlpatterns = patterns('',
 ...
 url(r'^tf/', include('two_factor.urls', 'tf')),
)


Make sure you've removed any of the other login routes, in order to not make the two-factor authentication circumvented.The Django admin interface will be automatically patched in order to use the new login method.
read more   
Last updated on September 14th, 2012

#two-factor authentication #Django authentication #Django app #Django #two-factor #authentication #auth

0 User reviews so far.

SUBMIT