Skip to content

Instantly share code, notes, and snippets.

@schaary
Created Apr 11, 2014
Embed
What would you like to do?
ldap_bind with net-ldap
require 'net/ldap'
ldap = Net::LDAP.new
ldap.host = your_server_ip_address
ldap.port = 389
ldap.auth "joe_user", "opensesame"
if ldap.bind
# authentication succeeded
else
# authentication failed
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment