diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/passwords.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/passwords.js b/lib/passwords.js index a5adee0..f194e79 100644 --- a/lib/passwords.js +++ b/lib/passwords.js @@ -18,7 +18,7 @@ function getPasswordManager() { getService(Ci.nsILoginManager); } -exports.setPassword = function setPassword (username, pass, +exports.setLogin = function setLogin (username, pass, domain, realm) { var lInfo = getLoginInfo(username, pass, domain, realm); getPasswordManager().addLogin(lInfo); @@ -26,7 +26,7 @@ exports.setPassword = function setPassword (username, pass, var getPassword = exports.getPassword = function getPassword(username, domain, realm) { - + var pwMgr = getPasswordManager(); var logins = pwMgr.findLogins({}, domain, "", realm); var ourLogins = Array.filter(logins, function (x) { @@ -38,14 +38,13 @@ var getPassword = exports.getPassword = function getPassword(username, } else { return null; } -}; -exports.removePassword = function removePassword(username, +exports.removeLogin = function removeLogin(username, domain, realm) { var pass = getPassword(username, domain, realm); var pwMgr = getPasswordManager(); var logins = pwMgr.findLogins({}, domain, "", realm); - + // Don't do Array.forEach here ... emulating break there // is an abomination for (var i = 0, ii = logins.length; i < ii; i++) { |