nsIPasswordManager 编辑
netwerk/base/public/nsIPasswordManager.idl
Scriptable Used to interface with the built-in Password Manager 66 Introduced Gecko 1.0 Deprecated Gecko 1.9 Inherits from: nsISupports
Last changed in Gecko 1.0See 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论