Simple middleware that injects the Authorization header in the request after authenticating against a ldap server.
Project description
django-ldap-basic-auth
======================
Simple middleware that injects the Authorization header in the request after authenticating against a ldap server
If you use BasicAuthentication in production you must ensure that your API is only available over https. You should also ensure that your API clients will always re-request the username and password at login, and will never store those details to persistent storage.
Installation
===============
You can install django-ldap-basic-auth in 2 ways: using pip or by setup.py install
$ pip install django-ldap-basic-auth
Then modify your settings.py
INSTALLED_APPS = INSTALLED_APPS + (
'django_ldap_basic_auth',
)
AUTHENTICATION_BACKENDS = ('django_ldap_basic_auth.backends.LdapBasicAuthBackend',) + AUTHENTICATION_BACKENDS
MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + (
'django_ldap_basic_auth.middleware.InjectBasicAuthMiddleware',
)
DJANGO_LDAP_BASIC_AUTH_ACTIVATED = True
You must define a django cache backend too.
Dependencies
============
* Django >= 1.4.x
* django-auth-ldap (https://pythonhosted.org/django-auth-ldap/)
TODO
====
* Improve tests
* Check if django-auth-ldap is installed
CHANGELOG
=========
* 0.0.1
* first version
======================
Simple middleware that injects the Authorization header in the request after authenticating against a ldap server
If you use BasicAuthentication in production you must ensure that your API is only available over https. You should also ensure that your API clients will always re-request the username and password at login, and will never store those details to persistent storage.
Installation
===============
You can install django-ldap-basic-auth in 2 ways: using pip or by setup.py install
$ pip install django-ldap-basic-auth
Then modify your settings.py
INSTALLED_APPS = INSTALLED_APPS + (
'django_ldap_basic_auth',
)
AUTHENTICATION_BACKENDS = ('django_ldap_basic_auth.backends.LdapBasicAuthBackend',) + AUTHENTICATION_BACKENDS
MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + (
'django_ldap_basic_auth.middleware.InjectBasicAuthMiddleware',
)
DJANGO_LDAP_BASIC_AUTH_ACTIVATED = True
You must define a django cache backend too.
Dependencies
============
* Django >= 1.4.x
* django-auth-ldap (https://pythonhosted.org/django-auth-ldap/)
TODO
====
* Improve tests
* Check if django-auth-ldap is installed
CHANGELOG
=========
* 0.0.1
* first version
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-ldap-basic-auth-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dabcef20f4f210b992cf9acbb3fedc1e5e17f921f9f7c6a0ca1f5611810795f |
|
MD5 | 548ededc80a759a2c9b2a99a0906064a |
|
BLAKE2b-256 | 64a0a58df704b1c3b6798256ac37655fc840983fcade384189869778f09d4e2d |