Does anybody know what the correct way to cache results from
Net::LDAP bind_as? I''ve been struggling for about a day now and I
know it''s something really easy. But when ever I do something like
this -
def self.login(username, password)
begin
ldap = Net::LDAP.new
ldap.host = "192.168.1.16"
ldap.port = 389
result = ldap.bind_as(
:base => "dc=net",
:filter => "(cn=#{username})",
:password => password
)
@dn = result.first.dn
rescue => e
false
end
end
and in my controller I do
if request.post?
session[:user_id] = AuthUser.login(params[:user]["username"],
params[:user]["password"])
end
My server returns a 500 error. I''ve tried from lighttpd and
locomotive. Both return the same generic error. I suspect it''s
related to the object returned is not compatible with the
marshal_dump. So the question is how do I copy the values from the
result set into my session object? Sorry if this is a stupid noobie
question but I am one so. :)
Thanks in advance.
Phill
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---