Backed out 2 changesets (bug 1900622) for causing Bug 1908553 and ktlint failure...
[gecko.git] / netwerk / base / nsIAuthPromptCallback.idl
blob27f89f04c0a56abbd58465aba1f60c4b2ae5fe88
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 interface nsIAuthInformation;
9 /**
10 * Interface for callback methods for the asynchronous nsIAuthPrompt2 method.
11 * Callers MUST call exactly one method if nsIAuthPrompt2::promptPasswordAsync
12 * returns successfully. They MUST NOT call any method on this interface before
13 * promptPasswordAsync returns.
15 [scriptable, uuid(bdc387d7-2d29-4cac-92f1-dd75d786631d)]
16 interface nsIAuthPromptCallback : nsISupports
18 /**
19 * Authentication information is available.
21 * @param aContext
22 * The context as passed to promptPasswordAsync
23 * @param aAuthInfo
24 * Authentication information. Must be the same object that was passed
25 * to promptPasswordAsync.
27 * @note Any exceptions thrown from this method should be ignored.
29 void onAuthAvailable(in nsISupports aContext,
30 in nsIAuthInformation aAuthInfo);
32 /**
33 * Notification that the prompt was cancelled.
35 * @param aContext
36 * The context that was passed to promptPasswordAsync.
37 * @param userCancel
38 * If false, this prompt was cancelled by calling the
39 * the cancel method on the nsICancelable; otherwise,
40 * it was cancelled by the user.
42 void onAuthCancelled(in nsISupports aContext, in boolean userCancel);