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.
A760c1a3dfb5a31e6139838a43e94089?d=identicon&s=25 Nicolas Kassis (Guest)
on 2006-06-09 02: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
C1e5a9e9344b6d31b9df7303e6dc378a?d=identicon&s=25 Craig White (Guest)
on 2006-06-09 04:42
(Received via mailing list)
On Thu, 2006-06-08 at 20:06 -0400, Nicolas Kassis 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
A760c1a3dfb5a31e6139838a43e94089?d=identicon&s=25 Nicolas Kassis (Guest)
on 2006-06-09 04:49
(Received via mailing list)
Craig White 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
C1e5a9e9344b6d31b9df7303e6dc378a?d=identicon&s=25 Craig White (Guest)
on 2006-06-09 05:02
(Received via mailing list)
On Thu, 2006-06-08 at 22:38 -0400, Nicolas Kassis 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
31ab75f7ddda241830659630746cdd3a?d=identicon&s=25 Austin Ziegler (Guest)
on 2006-06-09 06:09
(Received via mailing list)
On 6/8/06, Craig White <craigwhite@azapple.com> wrote:
> On Thu, 2006-06-08 at 20:06 -0400, Nicolas Kassis 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 Cianfrocca) is very
responsive.

-austin
58c44a4a506d878f9a112f1d7b7cb87e?d=identicon&s=25 Jeremy Evans (Guest)
on 2006-06-12 19:35
(Received via mailing list)
On 6/8/06, Nicolas Kassis <nic.kassis@gmail.com> 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 = '%s@domain.com'
  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...
Fee8639cfb6ab7b7cde02ffae431f49f?d=identicon&s=25 Justin Mecham (jsmecham)
on 2006-06-13 00: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 Ziegler 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
A760c1a3dfb5a31e6139838a43e94089?d=identicon&s=25 Nicolas Kassis (Guest)
on 2006-06-15 01: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.