Overview

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
module:

""" You must have AuthenticationMiddleware enabled """
MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'core.middleware.NoSelfLinksMiddleware',
)

""" You must add 'simpleopenid' to installed apps. Feel free to put it into
any folder or even rename its folder. """
INSTALLED_APPS = (
    'simpleopenid',
)

""" 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 = (
    'django.contrib.auth.backends.ModelBackend',
    'simpleopenid.auth.backends.OpenIDBackend',
)

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
info.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.