Removing unnecessarily stored cs shares.
Project: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/commit/166b07b7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/tree/166b07b7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/diff/166b07b7 Branch: refs/heads/add-documentation Commit: 166b07b72646a111a694eeb851c97d4737164278 Parents: 11db839 Author: Simeon Aladjem <[email protected]> Authored: Tue Dec 22 15:42:45 2015 +0200 Committer: Simeon Aladjem <[email protected]> Committed: Tue Dec 22 15:42:45 2015 +0200 ---------------------------------------------------------------------- lib/mpin.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-milagro-mfa-js-lib/blob/166b07b7/lib/mpin.js ---------------------------------------------------------------------- diff --git a/lib/mpin.js b/lib/mpin.js index 7ae1e67..c087f8c 100644 --- a/lib/mpin.js +++ b/lib/mpin.js @@ -147,17 +147,15 @@ var mpinjs = (function () { } } - self.addToUser(userId, {cs1: cs1Data.clientSecretShare, csParams: cs1Data.params, state: State.active}); _cs2Url = self.opts.certivoxURL + "clientSecret?" + cs1Data.params; //req cs2 self.request({url: _cs2Url}, function (err, cs2Data) { var csHex; - self.addToUser(userId, {cs2: cs2Data.clientSecret}); csHex = MPINAuth.addShares(cs2Data.clientSecret, cs1Data.clientSecretShare); - self.addToUser(userId, {csHex: csHex}); + self.addToUser(userId, {csHex: csHex, state: State.active}); cb(null, true); });
