Skip to content

Instantly share code, notes, and snippets.

@rotaris
Created April 18, 2011 11:07
Show Gist options
  • Select an option

  • Save rotaris/925142 to your computer and use it in GitHub Desktop.

Select an option

Save rotaris/925142 to your computer and use it in GitHub Desktop.
For Darius
# --- OneID LDAP Authentication --- #
import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
AUTH_LDAP_SERVER_URI = "..." # [censored] same as moodle
AUTH_LDAP_BIND_DN = "CN=sci.Search-LDAP,OU=SCI-Misc,OU=SCI,OU=MQ-BusUnit-Res,DC=mqauth,DC=uni,DC=mq,DC=edu,DC=au"
AUTH_LDAP_BIND_PASSWORD = "..." # censored
AUTH_LDAP_USER_SEARCH = LDAPSearch("OU=sSCI,OU=Students,OU=Active,OU=MQ-Users,DC=mqauth,DC=uni,DC=mq,DC=edu,DC=au",
ldap.SCOPE_SUBTREE, "(cn=*)")
AUTH_LDAP_START_TLS = True
# --- End OneID LDAP Authentication --- #
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
'django.contrib.auth.backends.ModelBackend',
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment