V
Varun Goel
hi all i made authentication function like this
require 'net/ldap'
module LDAP
def self.authenticate(user,password)
puts user
if user == "" || password == ""
return false
end
ldap_con = Net::LDAP.new({:host => '192.168.0.3',
:auth=>{:method=>:simple,:username => user,
assword => password } } )
return true if ldap_con.bind
return false
end
end
But when i send user name and password from rhtml page it's shows error
like
No connection to server
Please help me out.
Thanks
Varun
require 'net/ldap'
module LDAP
def self.authenticate(user,password)
puts user
if user == "" || password == ""
return false
end
ldap_con = Net::LDAP.new({:host => '192.168.0.3',
:auth=>{:method=>:simple,:username => user,
assword => password } } )
return true if ldap_con.bind
return false
end
end
But when i send user name and password from rhtml page it's shows error
like
No connection to server
Please help me out.
Thanks
Varun