Active DIrectory

I am building a application for my university and I would like to make
this
application authenticate agains a Active Directory server. I would like
to
know if there is an already built solution for this somewhere online ?

Thanks

On Thu, 2006-06-08 at 20:06 -0400, Nicolas K. wrote:

I am building a application for my university and I would like to make
this application authenticate agains a Active Directory server. I
would like to know if there is an already built solution for this
somewhere online ?


I haven’t authenticated against Active Directory but I have used
Ruby::LDAP to authenticate against my openLDAP server

Craig

Craig W. wrote:

I haven’t authenticated against Active Directory but I have used

I guess that could work. Can you send me some code samples ?

Thanks.

Nic

On Thu, 2006-06-08 at 22:38 -0400, Nicolas K. wrote:


I haven’t authenticated against Active Directory but I have used
Ruby::LDAP to authenticate against my openLDAP server

I guess that could work. Can you send me some code samples ?


http://wiki.rubyonrails.org/rails/pages/LDAPFunctions

http://ruby-ldap.sourceforge.net/

Craig

On 6/8/06, Craig W. [email protected] wrote:

On Thu, 2006-06-08 at 20:06 -0400, Nicolas K. wrote:

I am building a application for my university and I would like to make
this application authenticate agains a Active Directory server. I
would like to know if there is an already built solution for this
somewhere online ?
I haven’t authenticated against Active Directory but I have used
Ruby::LDAP to authenticate against my openLDAP server

Also make sure you check out Net::LDAP for Ruby
(http://rubyforge.org/projects/net-ldap). Although it’s relatively
new, it’s pure Ruby and requires no additional libraries or
compilation. Additionally, the developer (Francis C.) is very
responsive.

-austin

I’ve also started a project to deliver ActiveDirectory-specific
functionality to Ruby. It’s on RubyForge (http://rubyforge.org/frs/?
group_id=1580) and as a gem (gem install activedirectory). It
requires Ruby::LDAP, but I’m looking at Net::LDAP as mentioned here
by Austin Z. and will likely make it an option if it works out
well enough.

It’s pretty well documented, just rdoc it or view the docs through
gem_server.

Justin

On 6/8/06, Nicolas K. [email protected] wrote:

I am building a application for my university and I would like to make this
application authenticate agains a Active Directory server. I would like to
know if there is an already built solution for this somewhere online ?

I’ve put together a fairly simple plugin that does it [1], which I use
on one of my sites. It requires Ruby::LDAP. Here’s an example:

require ‘simple_ldap_authenticator’
SimpleLdapAuthenticator.servers = %w’dc1.domain.com dc2.domain.com
SimpleLdapAuthenticator.use_ssl = true
SimpleLdapAuthenticator.login_format = ‘[email protected]
SimpleLdapAuthenticator.logger = RAILS_DEFAULT_LOGGER

class LoginController < ApplicationController
def login
return redirect_to(:action=>‘try_again’) unless
SimpleLdapAuthenticator.valid?(params[:username], params[:password])
session[:username] = params[:username]
end
end

[1] http://wiki.rubyonrails.org/rails/pages/Simple+LDAP+Authenticator

Justin Mecham wrote:

Justin
Cool. I’m also looking at Net::LDAP. But I will surely look into that
gem.