node-ldapauth icon indicating copy to clipboard operation
node-ldapauth copied to clipboard

bcrypt is an optional dependency and allow anonymous login

Open sokra opened this issue 12 years ago • 8 comments

two little changes I needed to use this great lib.

sokra avatar Sep 11 '13 08:09 sokra

not sure about the bcrypt, but the anonymous login fix would be very helpful to me. I can submit as a separate change set... @vesse Is there a reason not to remove that check?

cstephe avatar Dec 10 '13 17:12 cstephe

@vesse picked the commit for another repo which has already many fixes including the anonymous login. You can switch from node-ldapauth to node-ldapauth-fork... I've done so...

sokra avatar Dec 10 '13 17:12 sokra

fantastic, keep up the good work!

cstephe avatar Dec 10 '13 17:12 cstephe

not really sure that you are using optionalDependencies correctly...

If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install, then you may put it in the optionalDependencies hash. This is a map of package name to version or url, just like the dependencies hash. The difference is that failure is tolerated.

It is still your program's responsibility to handle the lack of the dependency.

source


so, you would have to check if bcrypt is present (probably with try { ... } catch() { ... })

stryju avatar Jul 17 '14 15:07 stryju

ldapauth only requires bcrypt if you pass cache: true. So if you don't use the caching feature you can omit it. If you use the cache and bcrypt isn't loaded it throws an exception...

sokra avatar Jul 17 '14 17:07 sokra

@vesse Just saw all your great work on node-ldapauth-fork. What would you think about merging your changes into this repo, and me giving you commit and publish rights for this repo and its npm module?

trentm avatar Jul 17 '14 22:07 trentm

@trentm Thanks, that would be great!

vesse avatar Jul 18 '14 03:07 vesse

Whats the status on the merge?

solomongifford avatar Dec 10 '14 19:12 solomongifford