Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bcrypt api changes #1

Merged
merged 3 commits into from
Mar 16, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix for api changes in bcrypt
  • Loading branch information
jacques committed Mar 16, 2012
commit 2630eee8cc11f547464a789075a599ada9d3dde8
4 changes: 2 additions & 2 deletions lib/ldapauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function LdapAuth(opts) {
this._adminBound = false;
this._userClient = ldap.createClient(clientOpts);

this._salt = bcrypt.gen_salt_sync();
this._salt = bcrypt.genSaltSync();
}


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