wrap authenticate() parameters in a credential object
authorKen Dreyer <ktdreyer@ktdreyer.com>
Sun, 22 Apr 2012 04:42:28 +0000 (22:42 -0600)
committerKen Dreyer <ktdreyer@ktdreyer.com>
Thu, 17 May 2012 18:53:08 +0000 (12:53 -0600)
commit0d85f671f122f292dd56497eedd561efbb373e1d
tree8a1cf0b1c9f72b04cb9916e2ca42f38ab8ff9dcb
parentae29ae9fbe67fbb321aed7a650429b0f5799c734
wrap authenticate() parameters in a credential object

The authentication plugin API previously took a simple username and
password string pair. In preparation for alternative authentication
mechanisms, wrap the username and password inside a generic "credential"
object and pass that to authenticate(). This
Gitorious::Authentication::Credential object can contain a username and
password, but it can also be extended to support other kinds of
authentication.
app/controllers/sessions_controller.rb
lib/gitorious/authentication.rb
lib/gitorious/authentication/credentials.rb [new file with mode: 0644]
lib/gitorious/authentication/crowd_authentication.rb
lib/gitorious/authentication/database_authentication.rb
lib/gitorious/authentication/ldap_authentication.rb
test/unit/lib/gitorious/authentication/crowd_authentication_test.rb
test/unit/lib/gitorious/authentication/ldap_authentication_test.rb