Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lig/simpleopenid
Simple OpenID support for Django Framework.
https://github.com/lig/simpleopenid
Last synced: 12 days ago
JSON representation
Simple OpenID support for Django Framework.
- Host: GitHub
- URL: https://github.com/lig/simpleopenid
- Owner: lig
- License: bsd-3-clause
- Created: 2009-09-22T13:37:14.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2009-10-22T01:21:11.000Z (about 15 years ago)
- Last Synced: 2024-10-18T12:55:03.811Z (about 1 month ago)
- Language: Python
- Homepage: http://lig.github.com/simpleopenid
- Size: 97.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: COPYING
Awesome Lists containing this project
README
This is short developer instructions for django-simpleopenid library.
Project home page: http://lig.github.com/simpleopenidTo 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.