Giter VIP home page Giter VIP logo

django-auth-aadhaar's Introduction

Django Aadhaar-based User Authentication Module

The aim is to provide a standard way to add Aadhaar authentication to all django applications.

Status

Crude integration is now in place. We can start with a Aadhaar-specific login page, authenicate the user and complete the login process. It will stabilize over time with more usecases.

Usage

Please add the following to the settings.py:

   AUTH_USER_PROFILE='django_auth_aadhaar.AadhaarUserProfile'
   AUTHENTICATION_BACKENDS=('django_auth_aadhaar.backend.AadhaarBackend',)
   AADHAAR_CONFIG_FILE='...fixtures/auth.cfg' 

Please provide the full path for configuration file. Once the configuration is in place, then run the application. The examples directory has a sample application.

   $ cd examples/authextend 
   $ python manage.py syncdb 
   $ python manage.py runserver 

Now visit http://localhost:8000/login Fill in the details and press 'Authenticate'.

The body of the aadhaar-based login form can be obtained from the forms module.

   # views.py 
   from django_auth_aadhaar.forms import AadhaarAuthForm
   ...
   f = AadhaarAuthForm() 
   return render_to_response('auth.html',
                          {'form': f},
                          context_instance=RequestContext(request))

Caveat

It is work in progress. Still exploring better ways to implementing this. For now we use aadhaar number as the username, and AadhaarUserProfile to store extra information. In the backend we ignore the username.

  1. Only does authentication. Cannot change password or any other attributes.

  2. Creates a local user when the authentication happens. Cant avoid it, it seems. I looked at RemoteUserBackend as well without good answers.

  3. Does not fully address the security issues

Thanks

This is based on the django-ldap-auth implementation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.