简体   繁体   中英

LDAP Authorization for Node.JS in Windows

I'm trying to build a Node.JS project that takes advantage of LDAP authorization so that existing user authentication information can be used. The catch is that all our machines are Windows machines. All the solutions I've found so far (node-LDAP, ldapjs, ldapauth, etc) are built for Linux, and npm install [some_package] fails on Windows. More scrounging yielded complicated solutions or required building Node.JS packages from Python/C++ source locally, which starts getting messy and leads to dependency hell, as in this solution:

http://tochedev.blogspot.be/2012/07/i-wanted-to-add-ldapjs-to-my-windows.html

Kudos to the author for putting that effort in and publishing his path to success but if that level of complexity is required in dependency, then the solution isn't appropriate for my application.

That leaves me with limited options: redesign architecture around a Linux VM just so I can have LDAP authentication, which isn't much simpler than the linked solution above; abandon entire Node.JS project and do everything in another language just to support LDAP; dive into dependency hell just so I can have LDAP authentication; give up on LDAP authentication. I would love there to be a fourth option, a straightforward method of LDAP authentication in Node.JS for Windows, but I haven't found one so far. Now I've spent enough time searching that I'm ready to beg for help.

Sorry if this question is on the wrong StackExchange, I'll repost if necessary, didn't know exactly where it fit.

In my experience, there aren't a lot of good ldap tools for node (period). One of the alternatives is using something like Stormpath to handle this. Basically, you'd have to create a Stormpath account, run their LDAP agent, and they'll basically sync your LDAP accounts into their REST API which you can then access via their Node libraries .

This is a nice way to do it as you can interact with the LDAP accounts using a simple Node library, without needing to talk to your LDAP server directly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM