toolkit/components/passwordmgr/nsILoginInfo.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 [scriptable, uuid(c41b7dff-6b9b-42fe-b78d-113051facb05)]
michael@0 9
michael@0 10 /**
michael@0 11 * An object containing information for a login stored by the
michael@0 12 * password manager.
michael@0 13 */
michael@0 14 interface nsILoginInfo : nsISupports {
michael@0 15 /**
michael@0 16 * The hostname the login applies to.
michael@0 17 *
michael@0 18 * The hostname should be formatted as an URL. For example,
michael@0 19 * "https://site.com", "http://site.com:1234", "ftp://ftp.site.com".
michael@0 20 */
michael@0 21 attribute AString hostname;
michael@0 22
michael@0 23 /**
michael@0 24 * The URL a form-based login was submitted to.
michael@0 25 *
michael@0 26 * For logins obtained from HTML forms, this field is the |action|
michael@0 27 * attribute from the |form| element, with the path removed. For
michael@0 28 * example "http://www.site.com". [Forms with no |action| attribute
michael@0 29 * default to submitting to their origin URL, so we store that.]
michael@0 30 *
michael@0 31 * For logins obtained from a HTTP or FTP protocol authentication,
michael@0 32 * this field is NULL.
michael@0 33 */
michael@0 34 attribute AString formSubmitURL;
michael@0 35
michael@0 36 /**
michael@0 37 * The HTTP Realm a login was requested for.
michael@0 38 *
michael@0 39 * When an HTTP server sends a 401 result, the WWW-Authenticate
michael@0 40 * header includes a realm to identify the "protection space." See
michael@0 41 * RFC2617. If the response sent has a missing or blank realm, the
michael@0 42 * hostname is used instead.
michael@0 43 *
michael@0 44 * For logins obtained from HTML forms, this field is NULL.
michael@0 45 */
michael@0 46 attribute AString httpRealm;
michael@0 47
michael@0 48 /**
michael@0 49 * The username for the login.
michael@0 50 */
michael@0 51 attribute AString username;
michael@0 52
michael@0 53 /**
michael@0 54 * The |name| attribute for the username input field.
michael@0 55 *
michael@0 56 * For logins obtained from a HTTP or FTP protocol authentication,
michael@0 57 * this field is an empty string.
michael@0 58 */
michael@0 59 attribute AString usernameField;
michael@0 60
michael@0 61 /**
michael@0 62 * The password for the login.
michael@0 63 */
michael@0 64 attribute AString password;
michael@0 65
michael@0 66 /**
michael@0 67 * The |name| attribute for the password input field.
michael@0 68 *
michael@0 69 * For logins obtained from a HTTP or FTP protocol authentication,
michael@0 70 * this field is an empty string.
michael@0 71 */
michael@0 72 attribute AString passwordField;
michael@0 73
michael@0 74 /**
michael@0 75 * Initialize a newly created nsLoginInfo object.
michael@0 76 *
michael@0 77 * The arguments are the fields for the new object.
michael@0 78 */
michael@0 79 void init(in AString aHostname,
michael@0 80 in AString aFormSubmitURL, in AString aHttpRealm,
michael@0 81 in AString aUsername, in AString aPassword,
michael@0 82 in AString aUsernameField, in AString aPasswordField);
michael@0 83
michael@0 84 /**
michael@0 85 * Test for strict equality with another nsILoginInfo object.
michael@0 86 *
michael@0 87 * @param aLoginInfo
michael@0 88 * The other object to test.
michael@0 89 */
michael@0 90 boolean equals(in nsILoginInfo aLoginInfo);
michael@0 91
michael@0 92 /**
michael@0 93 * Test for loose equivalency with another nsILoginInfo object. The
michael@0 94 * passwordField and usernameField values are ignored, and the password
michael@0 95 * values may be optionally ignored. If one login's formSubmitURL is an
michael@0 96 * empty string (but not null), it will be treated as a wildcard. [The
michael@0 97 * blank value indicates the login was stored before bug 360493 was fixed.]
michael@0 98 *
michael@0 99 * @param aLoginInfo
michael@0 100 * The other object to test.
michael@0 101 * @param ignorePassword
michael@0 102 * If true, ignore the password when checking for match.
michael@0 103 */
michael@0 104 boolean matches(in nsILoginInfo aLoginInfo, in boolean ignorePassword);
michael@0 105
michael@0 106 /**
michael@0 107 * Create an identical copy of the login, duplicating all of the login's
michael@0 108 * nsILoginInfo and nsILoginMetaInfo properties.
michael@0 109 *
michael@0 110 * This allows code to be forwards-compatible, when additional properties
michael@0 111 * are added to nsILoginMetaInfo (or nsILoginInfo) in the future.
michael@0 112 */
michael@0 113 nsILoginInfo clone();
michael@0 114 };
michael@0 115
michael@0 116 %{C++
michael@0 117
michael@0 118 #define NS_LOGININFO_CONTRACTID "@mozilla.org/login-manager/loginInfo;1"
michael@0 119
michael@0 120 %}

mercurial