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 nsILoadContext
;
10 [scriptable
, function
, uuid(6b00d96d
-fb8a
-4c9f
-9632-c9e1235befce
)]
11 interface nsIClientAuthDialogCallback
: nsISupports
13 void certificateChosen
(in nsIX509Cert cert
, in boolean rememberDecision
);
17 * Provides UI when a server requests a TLS client authentication certificate.
19 [scriptable
, uuid(fa4c7520
-1433-11d5
-ba24
-00108303b117
)]
20 interface nsIClientAuthDialogService
: nsISupports
23 * Called when a user is asked to choose a certificate for client auth.
25 * @param hostname Hostname of the server.
26 * @param certArray Array of certificates the user can choose from.
27 * @param loadContext The nsILoadContext of the connection requesting a
28 * certificate. May be null, in which case the
29 * implementation will use the most recent window to show
31 * @param callback The nsIClientAuthDialogCallback to call when a certificate
32 * has been chosen (or no certificate).
35 void chooseCertificate
(in AUTF8String hostname
,
36 in Array
<nsIX509Cert
> certArray
,
37 in nsILoadContext loadContext
,
38 in nsIClientAuthDialogCallback
callback);
42 #define NS_CLIENTAUTHDIALOGSERVICE_CONTRACTID
"@mozilla.org/security/ClientAuthDialogService;1"