Readonly initializationReadonly isTrue when the primary password has already been entered, and so a caller can ask for decrypted logins without triggering a prompt.
Readonly uiTrue when a primary password prompt is being displayed.
Optional aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Store a new login in the login manager.
a clone of the login info with the guid set (even if it was not provided)
Default values for the login's nsILoginMetaInfo properties will be created. However, if the caller specifies non-default values, they will be used instead.
The login to be added.
Like addLogin, but asynchronous and for many logins.
A promise which resolves with a JS Array of cloned logins with the guids set.
Default values for each login's nsILoginMetaInfo properties will be created. However, if the caller specifies non-default values, they will be used instead.
A JS Array of nsILoginInfos to add.
Search for logins matching the specified criteria, as with findLogins(). This interface only returns the number of matching logins (and not the logins themselves), which allows a caller to check for logins without causing the user to be prompted for a primary password to decrypt the logins.
The origin to restrict searches to. Specify an empty string to match all origins. A null value will not match any logins, and will thus always return a count of 0.
The origin to which a form login will be submitted. To match any form login, specify an empty string. To not match any form login, specify null.
The HTTP Realm for which the login applies. To match logins for any realm, specify an empty string. To not match logins for any realm, specify null.
Check to see if saving logins has been disabled for an origin.
The origin to check. For example: "http://foo.com".
Returns the "sync id" used by Sync to know whether the store is current with respect to the sync servers.
Returns null if the data doesn't exist or if the data can't be decrypted (including if the primary-password prompt is cancelled). This is OK for Sync as it can't even begin syncing if the primary-password is locked as the sync encrytion keys are stored in this login manager.
Modify an existing login in the login manager.
The login to be modified.
The new login values (either a nsILoginInfo or nsIProperyBag)
If newLoginData is a nsILoginInfo, all of the old login's nsILoginInfo properties are changed to the values from newLoginData (but the old login's nsILoginMetaInfo properties are unmodified).
If newLoginData is a nsIPropertyBag, only the specified properties will be changed. The nsILoginMetaInfo properties of oldLogin can be changed in this manner.
If the propertybag contains an item named "timesUsedIncrement", the login's timesUsed property will be incremented by the item's value.
Record that the password of a saved login was used (e.g. submitted or copied).
The login record of the password that was used.
If the use was in private browsing AND without the user explicitly choosing to save/update. Login use metadata will not be updated in this case but it will stil be counted for telemetry.
One of "form_login", "form_password", "auth_login", or "prompt_login". See saved_login_used in Events.yaml. Don't assume that an auth. login is never used in a form and vice-versa. This argument indicates the context of how it was used.
Whether the login was filled, rather than being typed manually.
If only the username was used, this method shouldn't be called as we don't want to double-count the use if both the username and password are copied. Copying of the username normally precedes the copying of the password anyways.
Remove all stored user facing logins.
This will remove all the logins that a user can access through about:logins. This will not remove the FxA Sync key which is stored with the rest of a user's logins but is not accessible through about:logins
The browser sanitization feature allows the user to clear any stored passwords. This interface allows that to be done without getting each login first.
Asynchonously search for logins in the login manager. The Promise always resolves to an array; if there are no logins the array is empty.
A promise resolving to an array of nsILoginInfo objects.
The data used to search as a JS object. This does not follow the same
requirements as findLogins for those fields. Wildcard matches are
simply not specified. If a guid is specified then no other properties
are used (outside of GeckoView).
Disable (or enable) storing logins for the specified origin. When disabled, the login manager will not prompt to store logins for that origin. Existing logins are not affected.
The origin to set. For example: "http://foo.com".
Specify if saving logins should be enabled (true) or disabled (false)
Generated using TypeDoc
This promise is resolved when initialization is complete, and is rejected in case initialization failed. This includes the initial loading of the login data as well as any migration from previous versions.
Calling any method of nsILoginManager before this promise is resolved might trigger the synchronous initialization fallback.