Created
October 15, 2012 08:03
-
-
Save snuxoll/3891306 to your computer and use it in GitHub Desktop.
Usage for LDAP Auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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