Skip to content

Commit

Permalink
fix(app): fixed jshint warning in user model
Browse files Browse the repository at this point in the history
  • Loading branch information
DaftMonk committed Jan 17, 2014
1 parent 7d68cc9 commit f668fdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/express/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ UserSchema
.set(function(password) {
this._password = password;
this.salt = this.makeSalt();
this.hashedPassword = this.encryptPassword(password, this.salt);
this.hashedPassword = this.encryptPassword(password);
})
.get(function() {
return this._password;
Expand Down Expand Up @@ -120,7 +120,7 @@ UserSchema.methods = {
* @api public
*/
authenticate: function(plainText) {
return this.encryptPassword(plainText, this.salt) === this.hashedPassword;
return this.encryptPassword(plainText) === this.hashedPassword;
},

/**
Expand All @@ -140,7 +140,7 @@ UserSchema.methods = {
* @return {String}
* @api public
*/
encryptPassword: function(password, salt) {
encryptPassword: function(password) {
if (!password || !this.salt) return '';
var salt = new Buffer(this.salt, 'base64');
return crypto.pbkdf2Sync(password, salt, 10000, 64).toString('base64');
Expand Down

0 comments on commit f668fdc

Please sign in to comment.