Author : Benoît Chesneau <firstname.lastname@example.org> Url : [http://bitbucket.org/benoitc/django-authopenid/](http://bitbucket.org/benoitc/django-authopenid/)
Updated version of this doc is always here :
Django authentification application with openid using django auth contrib.
This application allow a user to connect to you website with :
- legacy account : username/password
- openid url
Idee is having workflow to integrate openid and _legacy_ authentification.
If the user connect with an openid he could associate it with its legaccy account or just create a new django account. When the user is connected you could manage him like you usually do with auth contrib or [django-registration](http://bitbucket.org/ubernostrum/django-registration/):
## Set your django project
- To use django_authopenid add django_authopenid.middleware.OpenIDMiddleware to MIDDLEWARE_CLASSES and
- 'django_authopenid' to INSTALLED_APP.
then add django_authopenid.urls to urls.py, for example :
so all django_authopenid view will be available under account/ path.
Set also your LOGIN_URL in settings.py to something like this:
ugettext = lambda s: s LOGIN_URL = '/%s%s' % (ugettext('account/'), ugettext('signin/'))
To install tables, run :
python manage.py syncdb
## Use it
all code is documented so you could esayly know what do a view.
- signin/signup :
- /account/signin : go to signin page
- /account/signout : signout url
- /account/signin/complete/ : register openid after signin
- /account/signup : legacy authentification
- /account/sendpw/password : send a new password
Templates are in templates/authopenid folder :
- complete.html : complete page after signin (register openid)
- signin.html : signin page