Merge branch 'release/2.8.4' into production

This commit is contained in:
Raymond Feng 2014-12-08 11:21:21 -08:00
commit a7dbb43940
3 changed files with 24 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2014-12-08, Version 2.8.4
=========================
* Allow native bcrypt for performance (Raymond Feng)
2014-12-08, Version 2.8.3 2014-12-08, Version 2.8.3
========================= =========================
@ -629,10 +635,6 @@
* Enhance the error message (Raymond Feng) * Enhance the error message (Raymond Feng)
2014-07-16, Version 2.0.0-beta7
===============================
* Bump version (Raymond Feng) * Bump version (Raymond Feng)
* 2.0.0-beta6 (Miroslav Bajtoš) * 2.0.0-beta6 (Miroslav Bajtoš)
@ -773,6 +775,13 @@
2014-07-16, Version 1.10.0 2014-07-16, Version 1.10.0
========================== ==========================
2014-07-16, Version 2.0.0-beta7
===============================
* Bump version (Raymond Feng)
* Remove unused dep (Raymond Feng) * Remove unused dep (Raymond Feng)
* Bump version and update deps (Raymond Feng) * Bump version and update deps (Raymond Feng)

View File

@ -6,7 +6,16 @@ var loopback = require('../../lib/loopback');
var path = require('path'); var path = require('path');
var SALT_WORK_FACTOR = 10; var SALT_WORK_FACTOR = 10;
var crypto = require('crypto'); var crypto = require('crypto');
var bcrypt = require('bcryptjs');
var bcrypt;
try {
// Try the native module first
bcrypt = require('bcrypt');
} catch (err) {
// Fall back to pure JS impl
bcrypt = require('bcryptjs');
}
var DEFAULT_TTL = 1209600; // 2 weeks in seconds var DEFAULT_TTL = 1209600; // 2 weeks in seconds
var DEFAULT_RESET_PW_TTL = 15 * 60; // 15 mins in seconds var DEFAULT_RESET_PW_TTL = 15 * 60; // 15 mins in seconds
var DEFAULT_MAX_TTL = 31556926; // 1 year in seconds var DEFAULT_MAX_TTL = 31556926; // 1 year in seconds

View File

@ -1,6 +1,6 @@
{ {
"name": "loopback", "name": "loopback",
"version": "2.8.3", "version": "2.8.4",
"description": "LoopBack: Open Source Framework for Node.js", "description": "LoopBack: Open Source Framework for Node.js",
"homepage": "http://loopback.io", "homepage": "http://loopback.io",
"keywords": [ "keywords": [