b7bf43c730
utils.py, views.py and backend.py were using .replace('v3', 'v2.0') and .replace('v2.0', 'v3') methods on url strings. This is BAD because if you have v3 in your url's domain it brakes it. A new url_path_replace method now only performs the replaces in the url path and leaves the domain unchanged. Some checks where performed to test if a substring was in the url path but the tests where performed on the whole url and could return a false positive if the substring exists in the domain name or in the query string. The new has_in_url_path method checks only if the substring is in the path of the url. Change-Id: I030d928d83e5c91cf26101221649a299d146747d Closes-Bug: 1324948 |
||
---|---|---|
.tx | ||
doc/source | ||
openstack_auth | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
LICENSE | ||
MANIFEST.in | ||
README.rst | ||
babel.cfg | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
README.rst
Django OpenStack Auth
Django OpenStack Auth is a pluggable Django authentication backend
that works with Django's contrib.auth
framework to
authenticate a user against OpenStack's Keystone Identity API.
The current version is designed to work with the Keystone V2 API.
You can view the documentation on Read The Docs.
Installation
Installing is quick and easy:
Run
pip install django_openstack_auth
.Add
openstack_auth
tosettings.INSTALLED_APPS
.Add
'openstack_auth.backend.KeystoneBackend'
to yoursettings.AUTHENTICATION_BACKENDS
, e.g.:AUTHENTICATION_BACKENDS = ('openstack_auth.backend.KeystoneBackend',)
Configure your API endpoint(s) in
settings.py
:OPENSTACK_KEYSTONE_URL = "http://example.com:5000/v2.0"
Include
'keystone_auth.urls'
somewhere in yoururls.py
file.Use it as you would any other Django auth backend.
Running The Tests
Download the repository and run:
python setup.py test