From: Damjan Rems Date: 2009-03-07T22:52:20+09:00 Subject: Re: LDAP authentication Palani Kumar wrote: > > > Hi > Can anyone please help how can i implement the LDAP > authentication in Ruby on Rails .i am unaware of this .I need to > implement the login by using LDAP authentication. please anyone tell me > the complete step by step details how we can implement. what should i > do. please help me. The same question was questioned by me few months ago on this forums and you can search here for more informations. This is my solution: gem install ruby-net-ldap add require 'net/ldap' => environment.rb ldap = Net::LDAP.new ldap.host = 'mydc.mydomain.com' ldap.port = 389 ldap.auth "#{params[:usr]}@mydomain.com", params[:pass] unless ldap.bind flash[:error] = "Password or user incorect!" return false end Works with Windows 2003 DC. by TheR -- Posted via http://www.ruby-forum.com/.