Support authenticated bind in LDAP.
authorMarius Mathiesen <marius@gitorious.org>
Thu, 19 Jul 2012 10:26:53 +0000 (12:26 +0200)
committerMarius Mathiesen <marius@gitorious.org>
Mon, 8 Oct 2012 07:41:33 +0000 (09:41 +0200)
commit235468105f734c210d4174e49b1ba84f818b0e03
treef1a81014b5d13e74dc2b83a5e7be9658f2257eb4
parent3ba55e439ab34467a90113ccc6092d6393cb725e
Support authenticated bind in LDAP.

Many LDAP installations use a two-step authentication scheme:
- first you connect with an unprivileged user's credentials
- once that is done, connect with the real user

This is supported in Net::LDAP through the bind_as method, which will:
- bind as the bind user
- do a search (as the bind user) for a user record with the provided
  username and password
- if this matches too, let the user in

Gitorious now handles situations where no bind_user section was specified
in authentication.yml.
lib/gitorious/authentication/ldap_authentication.rb
lib/gitorious/authentication/ldap_configurator.rb
test/unit/lib/gitorious/authentication/ldap_authentication_test.rb