tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIClientAuthRememberService.idl (2557B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 *
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #include "nsISupports.idl"
      8 
      9 %{ C++
     10 #include "mozilla/OriginAttributes.h"
     11 
     12 #define NS_CLIENTAUTHREMEMBERSERVICE_CONTRACTID "@mozilla.org/security/clientAuthRememberService;1"
     13 %}
     14 
     15 interface nsIX509Cert;
     16 
     17 [ref] native const_OriginAttributesRef(const mozilla::OriginAttributes);
     18 
     19 [scriptable, uuid(e92825af-7e81-4b5c-b412-8e1dd36d14fe)]
     20 interface nsIClientAuthRememberRecord : nsISupports
     21 {
     22  readonly attribute ACString asciiHost;
     23  readonly attribute ACString dbKey;
     24  readonly attribute ACString entryKey;
     25 };
     26 
     27 [scriptable, uuid(1dbc6eb6-0972-4bdb-9dc4-acd0abf72369)]
     28 interface nsIClientAuthRememberService : nsISupports
     29 {
     30  cenum Duration : 8 {
     31    Once = 0,
     32    Permanent = 1,
     33    Session = 2,
     34  };
     35 
     36  [must_use]
     37  void forgetRememberedDecision(in ACString key);
     38 
     39 
     40  [must_use]
     41  Array<nsIClientAuthRememberRecord> getDecisions();
     42 
     43 
     44  /**
     45   * Remember the use of a particular client certificate for a particular
     46   * hostname in the context of a given OriginAttributes for the given
     47   * duration. The certificate may be null, indicating that no certificate was
     48   * used.
     49   */
     50  [must_use, noscript]
     51  void rememberDecision(in ACString aHostName,
     52                        in const_OriginAttributesRef aOriginAttributes,
     53                        in nsIX509Cert aClientCert,
     54                        in nsIClientAuthRememberService_Duration aDuration);
     55 
     56  [implicit_jscontext]
     57  void rememberDecisionScriptable(in ACString aHostName,
     58                                  in jsval originAttributes,
     59                                  in nsIX509Cert aClientCert,
     60                                  in nsIClientAuthRememberService_Duration aDuration);
     61 
     62  [must_use, noscript]
     63  boolean hasRememberedDecision(in ACString aHostName,
     64                                in const_OriginAttributesRef aOriginAttributes,
     65                                out ACString aCertDBKey);
     66 
     67  [implicit_jscontext]
     68  boolean hasRememberedDecisionScriptable(in ACString aHostName,
     69                                          in jsval originAttributes,
     70                                          out ACString aCertDBKey);
     71 
     72  [must_use]
     73  void clearRememberedDecisions();
     74 
     75  [implicit_jscontext]
     76  void deleteDecisionsByHost(in ACString aHostName,
     77                             in jsval aOriginAttributes);
     78 };