diff options
author | Markus Zapke-Grùˆndemann <info@keimlink.de> | 2012-01-01 19:00:11 +0100 |
---|---|---|
committer | Markus Zapke-Grùˆndemann <info@keimlink.de> | 2012-01-01 19:00:11 +0100 |
commit | aebb7b182f982dbd14f54abf10edc4a125bf027b (patch) | |
tree | 349500b98b38dd1123b15b79a38b94dc689906ed /sublab_project | |
parent | a3239f592d5738801a4d8b6a0489fd564f816c96 (diff) |
Added LDAP authentication (not working yet).
Diffstat (limited to 'sublab_project')
-rw-r--r-- | sublab_project/settings.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sublab_project/settings.py b/sublab_project/settings.py index b748f3e..d35e5c7 100644 --- a/sublab_project/settings.py +++ b/sublab_project/settings.py @@ -1,6 +1,10 @@ # Django settings for sublab_project project. import os +# from django_auth_ldap.config import LDAPSearch +# import ldap + + SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) DEBUG = False TEMPLATE_DEBUG = DEBUG @@ -166,6 +170,25 @@ LOGGING = { } } +# AUTH_LDAP_SERVER_URI = 'ldap://taifun.local.sublab.org' +# AUTH_LDAP_BIND_DN = 'cn=djangotest,ou=users,dc=sublab,dc=org' +# AUTH_LDAP_BIND_PASSWORD = 'djangotest' +# AUTH_LDAP_USER_SEARCH = LDAPSearch('ou=users,dc=sublab,dc=org', +# ldap.SCOPE_SUBTREE, '(uid=%(user)s)') +AUTH_LDAP_USER_DN_TEMPLATE = 'uid=%(user)s,ou=users,dc=sublab,dc=org' +AUTH_LDAP_USER_ATTR_MAP = { + 'first_name': 'givenName', + 'last_name': 'sn', + 'email': 'mail' +} +AUTH_LDAP_ALWAYS_UPDATE_USER = True +AUTH_LDAP_START_TLS = True + +AUTHENTICATION_BACKENDS = ( + 'django_auth_ldap.backend.LDAPBackend', + 'django.contrib.auth.backends.ModelBackend', +) + try: from local_settings import * except ImportError: |