Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Internet > HTTP (WWW)

    django_tfa 0.1

    Download button

    No screenshots available
    Downloads: 93  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Simone Lusenti | More programs
    GPL / FREE
    January 6th, 2012, 04:22 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django_tfa description

    Two factor authentication support for Django projects (Time based tokens)

    django_tfa is a Django app that implements Two-Factor authentication based on Django's contrib.auth.

    One Time Tokens are generated using Tomasz's onetimepass (https://github.com/tadeck/onetimepass). This module is already included in this distribution (file: otp.py). Django_tfa uses TOTPs (Time-based One Time Passwords) with base32 encoded secrets. It's fully compatible with Google Authenticator (download from http://code.google.com/p/google-authenticator/) and maybe other apps.

    Installation

    Devel:

    git clone git://github.com/lusentis/django_tfa.git
    sudo python setup.py install


    Stable:

    sudo easy_install django_tfa

    Setup

    1. Add twofactor to your INSTALLED_APPS list.

     INSTALLED_APPS = ( ... 'twofactor', ... )

    2. Sync database (optional: use south)

     # no south:
     ./manage.py syncdb

     # south (recomended):
     ./manage.py schemamigration --initial twofactor
     ./manage.py syncdb
     ./manage.py migrate


    1. Add some settings (optional, defaults are shown)

     from twofactor.callbacks import everyone_must_have_otp
     TWOFACTOR_ENABLED_CALLBACK = everyone_must_have_otp
     TWOFACTOR_ENABLE_AT_FIRST_LOGIN = True
     TWOFACTOR_TOKEN_LENGTH = 32


    1. Add login and logout templates (the same you use with contrib.auth)

    2. Add twofactor urls to your root urls.py

     url(r'^login/$', 'twofactor.views.login_view', {'template_name':'login.html'},
     name='login'),
     url(r'^login/tfa$', 'twofactor.views.login_twofactor', {'template_name':'login_twofactor.html'},
     name='login_twofactor'),
     url(r'^login/tfa/enable$', 'twofactor.views.twofactor_enable',
     name='login_twofactor_enable'),


    You need to replace your existing /login/ url from django.contrib.auth.

    1. Add some users from Django admin or ./manage.py shell

    Bugs

    - Post-login redirect is not handled correctly, so you should have a urlpattern named "home" that is where you want to be reidrected after the login.

    - Putting twofactor's urls in a separate file (eg: twofactor.urls) breaks the urlconf reverse function... why?

    Sample


    Clone this repo and run:

    ./manage.py syncdb
    ./manage.py runserver


    and point your browser to http://localhost:8000


    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    Two-Factor authentication | time based tokens | Django | Two-Factor | authentication

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM