Forum: Ruby on Rails Active DIrectory

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Nicolas K. (Guest)
on 2006-06-09 04:08
(Received via mailing list)
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
Craig W. (Guest)
on 2006-06-09 06:42
(Received via mailing list)
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
Nicolas K. (Guest)
on 2006-06-09 06:49
(Received via mailing list)
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
Craig W. (Guest)
on 2006-06-09 07:02
(Received via mailing list)
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
Austin Z. (Guest)
on 2006-06-09 08:09
(Received via mailing list)
On 6/8/06, Craig W. <removed_email_address@domain.invalid> 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
Jeremy E. (Guest)
on 2006-06-12 21:35
(Received via mailing list)
On 6/8/06, Nicolas K. <removed_email_address@domain.invalid> 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 = 'removed_email_address@domain.invalid'
  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+LDA...
Justin M. (Guest)
on 2006-06-13 02:26
(Received via mailing list)
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
Nicolas K. (Guest)
on 2006-06-15 03:41
(Received via mailing list)
Justin Mecham wrote:

> Justin
Cool. I'm also looking at Net::LDAP. But I will surely look into that
gem.
This topic is locked and can not be replied to.