welcome: please sign in
location: PasswordManagement

1. Enabling the Password Manager

Xulrunner provides a simple password management service. To use it, put the following in your rc:

session_pref("signon.rememberSignons", true);
session_pref("signon.expireMasterPassword", false);
session_pref("signon.SignonFileName", "signons.txt");
Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager); // init

2. Managing Passwords in the RC

Conkeror provides several utilities that allow you to easily manage logins directly in javascript.

2.1. API

2.1.1. login_find

Find and return a login (an nsILoginInfo) matching the given host. The host can be given as a string (for an exact match) or as a RegExp.

2.1.2. login_find_all

Return an array of all logins (nsILoginInfo objects) that match the given host. Host may be given as a string (for an exact match) or as a RegExp.

2.1.3. login_remove

Remove the given login. The login must be an nsILoginInfo object, which can be gotten from login_find or login_find_all.

2.1.4. login_add

function login_add (host, username, password,
                    httprealm, form_submit_url,
                    username_field, password_field)

host, username, and password are mandatory arguments. one or the other of form_submit_url and httprealm is also mandatory, but if neither is given, the host will be used for form_submit_url. httprealm corresponds to the value of the http header in a 401 Authorization Required, 'WWW-Authenticate: Basic realm="foo"'.

2.1.5. login_set

function login_set (host, username, password,
                    httprealm, form_submit_url,
                    username_field, password_field)

login_set first removes all existing logins for the given host, then passes all of its arguments to login_add.

3. GUI Tools

3.1. Deleting Stored Passwords

The interactive command password-manager opens the Mozilla password manager dialog in a new buffer, from which you can delete stored passwords.

3.2. Editing passwords

The extension Saved Password Editor augments the password manager dialog with abilities to edit and manually add passwords. The extension is fully compatible with Conkeror since version 2.0. With earlier versions, it's necessary to edit the install.rdf as detailed on Extensions.

4. Debugging Password Management


Conkeror.org: PasswordManagement (last edited 2011-10-18 17:33:04 by retroj)