Used to interface with the built-in Password Manager
39
Introduced
Gecko 1.0
Deprecated
Gecko 1.9
Inherits from:
nsISupports
Last changed in Gecko 1.0 See Using nsIPasswordManager for examples.
Implemented by: @mozilla.org/passwordmanager;1
. To create an instance, use:
var passwordManager = Components.classes["@mozilla.org/passwordmanager;1"] .getService(Components.interfaces.nsIPasswordManager);
Method overview
void addUser(in AUTF8String aHost, in AString aUser, in AString aPassword); |
void removeUser(in AUTF8String aHost, in AString aUser); |
void addReject(in AUTF8String aHost); |
void removeReject(in AUTF8String aHost); |
Attributes
Attribute | Type | Description |
enumerator |
|
Readonly: An enumeration of the stored usernames and passwords as nsIPassword objects. |
enumerator |
|
Readonly: An enumeration of the rejected sites as nsIPassword objects. Only the host portion of these objects is relevant. |
Methods
addUser()
Stores a password.
AString addUser(in AUTF8String aHost, in AString aUser, in AString aPassword);
Parameters
-
aHost
- The hostname of the password to store.
-
aUser
- The username of the password to store.
-
aPassword
- The password to store.
removeUser()
Removes a stored password.
void removeUser(in AUTF8String aHost, in AString aUser);
Parameters
-
aHost
- The hostname of the password to remove.
-
aUser
- The username of the password to remove.
addReject()
Blocks a hostname from having its passwords saved.
void addReject(in AUTF8String aHost);
Parameters
-
aHost
- The name of the hostname for which passwords should no longer be saved.
removeReject()
Unblocks a hostname from having its passwords saved.
void removeReject(in AUTF8String aHost);
Parameters
-
aHost
- The name of the hostname for which passwords can be saved again.