Skip to content

Commit 2630eee

Browse files
committed
Fix for api changes in bcrypt
1 parent 20980e1 commit 2630eee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ldapauth.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function LdapAuth(opts) {
6767
this._adminBound = false;
6868
this._userClient = ldap.createClient(clientOpts);
6969

70-
this._salt = bcrypt.gen_salt_sync();
70+
this._salt = bcrypt.genSaltSync();
7171
}
7272

7373

@@ -158,7 +158,7 @@ LdapAuth.prototype.authenticate = function (username, password, callback) {
158158
if (self.opts.cache) {
159159
// Check cache. "cached" is `{password: <hashed-password>, user: <user>}`.
160160
var cached = self.userCache.get(username);
161-
if (cached && bcrypt.compare_sync(password, cached.password)) {
161+
if (cached && bcrypt.compareSync(password, cached.password)) {
162162
return callback(null, cached.user)
163163
}
164164
}

0 commit comments

Comments
 (0)