nsILoginInfo
| IID: | 9c87a9bd-bf8b-4fae-bdb8-70513b2877df |
| Inherits From: | nsISupports |
An object containing information for a login stored by the password manager.
This interface is implemented by the following components:
Properties
AString formSubmitURL
The URL a form-based login was submitted to.
For logins obtained from HTML forms, this field is the action attribute from the form element, with the path removed. For example "http://www.site.com". [Forms with no action attribute default to submitting to their origin URL, so we store that.]
For logins obtained from a HTTP or FTP protocol authentication, this field is NULL.
AString hostname
The hostname the login applies to.
The hostname should be formatted as an URL. For example, "https://site.com", "http://site.com:1234", "ftp://ftp.site.com".
AString httpRealm
The HTTP Realm a login was requested for.
When an HTTP server sends a 401 result, the WWW-Authenticate header includes a realm to identify the "protection space." See RFC2617. If the response sent has a missing or blank realm, the hostname is used instead.
For logins obtained from HTML forms, this field is NULL.
AString password
The password for the login.
AString passwordField
The name attribute for the password input field.
For logins obtained from a HTTP or FTP protocol authentication, this field is NULL.
AString username
The username for the login.
AString usernameField
The name attribute for the username input field.
For logins obtained from a HTTP or FTP protocol authentication, this field is NULL.
Methods
PRBool equals ( nsILoginInfo loginInfo )
void init ( AString hostname , AString formSubmitURL , AString httpRealm , AString username , AString password , AString usernameField , AString passwordField )
PRBool matches ( nsILoginInfo loginInfo , PRBool ignorePassword )
PRBool equals ( nsILoginInfo loginInfo )
Test for strict equality with another nsILoginInfo object.
- Arguments:
- loginInfo: The other object to test.
void init ( AString hostname , AString formSubmitURL , AString httpRealm , AString username , AString password , AString usernameField , AString passwordField )
Initialize a newly created nsLoginInfo object.
The arguments are the fields for the new object.
- Arguments:
- hostname
- formSubmitURL
- httpRealm
- username
- password
- usernameField
- passwordField
PRBool matches ( nsILoginInfo loginInfo , PRBool ignorePassword )
Test for loose equivalency with another nsILoginInfo object. The passwordField and usernameField values are ignored, and the password values may be optionally ignored. If one login's formSubmitURL is an empty string (but not null), it will be treated as a wildcard. [The blank value indicates the login was stored before bug 360493 was fixed.]
- Arguments:
- loginInfo: The other object to test.
- ignorePassword: If true, ignore the password when checking for match.
References
This interface is passed as an argument to the following methods:
nsILoginInfo.equals, nsILoginInfo.matches, nsILoginManager.addLogin, nsILoginManager.modifyLogin, nsILoginManager.removeLogin, nsILoginManagerPrompter.promptToChangePassword, nsILoginManagerPrompter.promptToChangePasswordWithUsernames, nsILoginManagerPrompter.promptToSavePassword, nsILoginManagerStorage.addLogin, nsILoginManagerStorage.modifyLogin, nsILoginManagerStorage.removeLogin
Reference documentation is generated from Mozilla's source.
