Skip to content

Instantly share code, notes, and snippets.

@snuxoll
Created October 15, 2012 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snuxoll/3891306 to your computer and use it in GitHub Desktop.
Save snuxoll/3891306 to your computer and use it in GitHub Desktop.
Usage for LDAP Auth
user = Shop::LDAP.find_user("snuxoll")
if (Shop::LDAP.authenticate_user(user.dn, password) && Shop::LDAP.user_authorized?(user))
# Cool, we've got the right password and we're in the correct security group
true
else
# Somebody dun goofed
false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment