Thursday, March 24, 2011

Re: Django & Two Factor Authentication (2FA)

On 24 March 2011 14:50, pokecho <pokecho@gmail.com> wrote:
> Hi Sam,
>
>
> So how do I configure contrib.auth to authenticate against three input
> values "username"(static), password(static/encrypted) and PIN/
> token(dynamic/encrypted)? That is the question.

As Sam already said, you need to write a custom authentication
backend[1] and use it instead of the default one.

Of course, you'll also need a custom form on your login page. If you
want to use the same system in Django's admin, you'll need to create
your own subclass of AdminSite and override the form and template
used[2].


[1]: http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backend
[2]: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.AdminSite.login_form

--
Łukasz Rekucki

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate