Welcome to the repoze.who LDAP plugin demo! ${sidebar_top()}

This is a TurboGears 2 powered project that demonstrates the use of the repoze.who LDAP plugin.

  1. Configure it!

    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!

  2. See it in action!

    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
  3. Enable LDAP authentication in your WSGI applications!

    Keep this project as a reference on how to implement the repoze.who LDAP plugin in your applications. Then learn more about:

    1. repoze.who.plugins.ldap, if you want to make the most out of your LDAP authentication!
    2. repoze.who, if you want more information about this authentication middleware. If you want to customize the login form, it's all possible, but that's out of the scope of the LDAP plugin — check the documentation for the FormPlugin plugin.