This is a TurboGears 2 powered project that demonstrates the use of the repoze.who LDAP plugin.
Open the who.ini file of the project and set the URL to your LDAP server and the base Distinguished Name for the people who are going to access the system. For example, it may look like this:
# ... [plugin:ldap_auth] use = repoze.who.plugins.ldap:LDAPAuthenticatorPlugin ldap_connection = ldap://ldap.gnu.org base_dn = ou=developers,dc=gnu,dc=org # ...
It's that simple!
Now try to access the private page "about" and enter your LDAP credentials on the LDAP server in use. Note that you should only enter your UID, not the whole Distinguished Name — your DN will be made by joining together the UID you provided in the login form and the base_dn parameter you defined above in the who.ini file.
For example, if you give rms as the user name in the login form, the LDAP will know your DN is the following one thanks to the base DN you defined in who.ini.
uid=rms,ou=developers,dc=gnu,dc=org
Keep this project as a reference on how to implement the repoze.who LDAP plugin in your applications. Then learn more about: