This is short developer instructions for django-simpleopenid library.
Project home page: http://lig.github.com/simpleopenid
To use django-simpleopenid you must add following in your Django settings
""" You must have AuthenticationMiddleware enabled """
MIDDLEWARE_CLASSES = (
""" You must add 'simpleopenid' to installed apps. Feel free to put it into
any folder or even rename its folder. """
INSTALLED_APPS = (
""" You must add 'simpleopenid.auth.backends.OpenIDBackend' to your
authentication backedns. You must provide default ModelBackend explicit to
let work ordinary user/password authentication work. """
AUTHENTICATION_BACKENDS = (
Then you must run 'python manage.py syncdb' in your project folder.
After setting up django-simpleopenid you could use it in several ways:
1. Add urls patterns from urls_sample/py file to your urls.py and use form
classes from simpleopenid.forms to authenticate users. All forms return
redirect to user profile on success or to 'index' url on fail.
New users are creating automaticaly.
There are url named 'openid-login' that you could use as entry point.
You might need to make your own 'openid/login.html' template using
'openid_login_form' template variable for form instance.
2. Use 'contrib.auth.authenticate' in to steps. Look into docstrings of the
'simpleopenid.auth.backends.OpenIDBackend.authenticate' method for more