Replaced bcrypt with bcrypt-nodejs

This commit is contained in:
Gabor Javorszky 2013-05-27 17:10:35 +01:00
parent 1e47f4e825
commit 18166337b8
2 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
var util = require('util'), var util = require('util'),
_ = require('underscore'), _ = require('underscore'),
bcrypt = require('bcrypt'), bcrypt = require('bcrypt-nodejs'),
models = require('./models.js'), models = require('./models.js'),
when = require('when'), when = require('when'),
nodefn = require('when/node/function'), nodefn = require('when/node/function'),
@ -30,9 +30,10 @@
// Clone the _user so we don't expose the hashed password unnecessarily // Clone the _user so we don't expose the hashed password unnecessarily
userData = _.extend({}, _user); userData = _.extend({}, _user);
return nodefn.call(bcrypt.hash, _user.password, 10).then(function (hash) { return nodefn.call(bcrypt.hash, _user.password, null, null).then(function (hash) {
userData.password = hash; userData.password = hash;
return BaseProvider.prototype.add.call(self, userData); return BaseProvider.prototype.add.call(self, userData);
}); });
}; };

View File

@ -19,7 +19,7 @@
"bookshelf": "0.1.x", "bookshelf": "0.1.x",
"knex": "0.1.x", "knex": "0.1.x",
"when": "2.1.x", "when": "2.1.x",
"bcrypt": "~0.7.5" "bcrypt-nodejs": "0.0.3"
}, },
"devDependencies": { "devDependencies": {
"grunt": "~0.4.1", "grunt": "~0.4.1",