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
;
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
19 * Authentication information is available.
22 * The context as passed to promptPasswordAsync
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
);
33 * Notification that the prompt was cancelled.
36 * The context that was passed to promptPasswordAsync.
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
);