I am currently working on a web application in node.js in which a user needs to log in to access the information. I want to check the user login and password with an external active directory server. I have tried using node-ldapauth, but I can’t get it work (I don’t know if it works for active directories, maybe just openLdap). Any suggestions?
Share
I used an rubyldap library to solve the problem thanks!
Update: As requested this is the library I used to solve the problem https://github.com/ruby-ldap/ruby-net-ldap/
After installing the ruby library on your server, using gem install (look it up it’s not too hard)
Set up a ruby file as shown above.
You can run the ruby library by using
To grab the user and password in ruby use ARGV[0] and ARGV1.
You can grab the ruby returned result in node.js by using a call back function
in the theCallBack function you can grab the returned ruby library results by passing in stdout
ex:
Hope this helps!