Hello I have an application that is working. Now i want to have a login page to make the authentication using ldap. How can i do that with rails? What is the best library/extension to do that? Thanks regards -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ruby''s net_ldap library works great for this. On 10/24/07, Paulo Carvalho <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Hello > > I have an application that is working. > Now i want to have a login page to make the authentication using ldap. > How can i do that with rails? > What is the best library/extension to do that? > > Thanks > regards > -- > Posted via http://www.ruby-forum.com/. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I found it but it doens not have any information. Could you tell me how can I install and use it? Jamey Cribbs wrote:> Ruby''s net_ldap library works great for this.-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
IIRC, you can do a gem install ruby_net_ldap. Google for something like "rails ldap authenticate" and you should be able to find examples of using it. Basically, you can just call it''s bind method and if that is successful, you know that you have authenticated. On 10/24/07, Paulo Carvalho <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I found it but it doens not have any information. > > Could you tell me how can I install and use it? > > Jamey Cribbs wrote: > > Ruby''s net_ldap library works great for this. > > -- > Posted via http://www.ruby-forum.com/. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you Ive just installed it and i am gonna to try now. regards Jamey Cribbs wrote:> IIRC, you can do a gem install ruby_net_ldap. Google for something like > "rails ldap authenticate" and you should be able to find examples of > using > it. Basically, you can just call it''s bind method and if that is > successful, you know that you have authenticated.-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
A bit late, but for those who might search the archives, I like acts_as_ldap_authenticated (for my rails 1.2.6 site) http://www.noitulove.ch/ldap-authentication-plugin-for-rails/ As the post indicates, it is largely a drop in replacement for the acts_as_authenticated plugin. But if you also use Oracle, there is a library conflict. See this for the work around (require ''ldap'' before the rails boot line in environment.rb) http://lists.rubyonrails.org/pipermail/rails/2006-April/032583.html -- Cynthia Kiser cynthia.kiser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
from this page, http://wiki.rubyonrails.org/rails/pages/ldap i see that there are at least three different ways for rails to implement ldap: * Net-LDAP - Pure Ruby LDAP API * Ruby/LDAP - Interface to some common LDAP libraries * ActiveLDAP - the ActiveRecord way -what are some advantages of each over the others? disadvantages? -comparative ease of use in setting up and maintenance? finding resources on the net and books? -what factors contributed in your choice of which implementation to go with? it seems from some postings in this group that folks seem to recommend either net_ldap and/or activeldap for ldap authentication with rails. why? thank you.> From: "Jamey Cribbs" <jcri...-5tZyCCM3m2VWk0Htik3J/w@public.gmane.org> > Date: Wed, 24 Oct 2007 10:01:14 -0400 > Local: Wed, Oct 24 2007 6:01 am> Ruby''s net_ldap library works great for this.On 10/24/07, Paulo Carvalho <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:>> Hello >> I have an application that is working. >> Now i want to have a login page to make the authentication using ldap. >> How can i do that with rails? >> What is the best library/extension to do that?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''ve just used Net-LDAP, but not before wasting lots of time trying to get ActiveLDAP working. For me, a relatively new RoR user, I never found a single place with complete documentation on how to set it up in a Rails app. The docs for Net-LDAP had the best examples for me, as I''m only after simple auth. I don''t need a full OO API to build a dir management system which ActiveLDAP promises. <http://rubyfurnace.com/docs/ruby-net-ldap-0.0.4/> <http://wiki.rubyonrails.org/rails/pages/HowtoAuthenticateWithRubyNetLdap> <http://www.rich-waters.com/blog/2007/02/using-domino-logins-ldap-for-a-ruby-on-rails-app.html> Hal Fulton''s (great) book The Ruby Way has a page on interfacing to LDAP - I took his advice and investigated all of them to form my own opinion. Hal also mentions acts_as_authenticated in The Rails Way (also great) which gave me clues for where the code goes in my app. George On Jan 17, 2008 7:10 AM, scootiePuff <elle.on.rails-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > from this page, > http://wiki.rubyonrails.org/rails/pages/ldap > > i see that there are at least three different ways for rails to > implement ldap: > > * Net-LDAP - Pure Ruby LDAP API > * Ruby/LDAP - Interface to some common LDAP libraries > * ActiveLDAP - the ActiveRecord way > > -what are some advantages of each over the others? disadvantages? > -comparative ease of use in setting up and maintenance? finding > resources on the net and books? > -what factors contributed in your choice of which implementation to go > with? > > it seems from some postings in this group that folks seem to recommend > either net_ldap and/or activeldap for ldap authentication with rails. > why? > > thank you. > > > > From: "Jamey Cribbs" <jcri...-5tZyCCM3m2VWk0Htik3J/w@public.gmane.org> > > Date: Wed, 24 Oct 2007 10:01:14 -0400 > > Local: Wed, Oct 24 2007 6:01 am > > > Ruby''s net_ldap library works great for this. > > On 10/24/07, Paulo Carvalho <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> Hello > >> I have an application that is working. > >> Now i want to have a login page to make the authentication using ldap. > >> How can i do that with rails? > >> What is the best library/extension to do that? > > >-- George Bray, The Australian National University, Canberra, Australia. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, 2008-01-16 at 12:10 -0800, scootiePuff wrote:> from this page, > http://wiki.rubyonrails.org/rails/pages/ldap > > i see that there are at least three different ways for rails to > implement ldap: > > * Net-LDAP - Pure Ruby LDAP API > * Ruby/LDAP - Interface to some common LDAP libraries > * ActiveLDAP - the ActiveRecord way > > -what are some advantages of each over the others? disadvantages? > -comparative ease of use in setting up and maintenance? finding > resources on the net and books? > -what factors contributed in your choice of which implementation to go > with? > > it seems from some postings in this group that folks seem to recommend > either net_ldap and/or activeldap for ldap authentication with rails. > why? >---- I don''t know, I use ruby/LDAP for authentication. It was the first/easiest method I got to work, it''s part of rpmforge packages so it installs easy on RHEL/CentOS/Fedora and it has just worked. Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Oops, of course The Rails Way is by Obie Fernandez. A great reference.> Hal Fulton''s (great) book The Ruby Way has a page on interfacing to > LDAP - I took his advice and investigated all of them to form my own > opinion. Hal also mentions acts_as_authenticated in The Rails Way > (also great) which gave me clues for where the code goes in my app.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> i see that there are at least three different ways for rails to > implement ldap: > > * Net-LDAP - Pure Ruby LDAP API > * Ruby/LDAP - Interface to some common LDAP libraries > * ActiveLDAP - the ActiveRecord way > > -what are some advantages of each over the others? disadvantages?ActiveLDAP is higher level - it depends on Ruby/LDAP for the low level LDAP interactions and then builds a ruby object corresponding to your LDAP object. If you want to display your LDAP information on your Rails-based web site, it is the way to go. If you are just going to use LDAP for authenticating users, it is overkill. As I mentioned previously, if your site is Rails 1.x, acts_as_ldap_authenticated was a drop in replacement for acts_as_authenticated. I don''t know how much fiddling it will take to get that plugin to work in Rails 2.0, but I will probably find out in the next 2-3 months when I convert some sites. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---