djangosnippets.org: Latest snippets posted by jfray2https://djangosnippets.org/users/jfray2/2007-12-09T19:03:15.774001-06:00jfray2Authenticate against Active Directory
2007-12-09T19:03:15.774001-06:00jfray2https://djangosnippets.org/snippets/501/<p>I put this in a file called auth.py, then referenced it in the settings.py like so:</p>
<pre><code>AUTHENTICATION_BACKENDS = ('myproject.myapp.auth.ActiveDirectoryBackend',)
</code></pre>
<p>This has been tested on my office network, with the following setup:</p>
<pre><code>Django 0.96
Python 2.4.4
python-ldap
Fedora Core 5 (On the server hosting Django)
AD Native Mode
2 Windows 2003 …</code></pre>
Freely redistributable