tor-browser

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

nsIHttpAuthManager.idl (4892B)


      1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #include "nsISupports.idl"
      7 
      8 interface nsIPrincipal;
      9 
     10 /**
     11 * nsIHttpAuthManager
     12 *
     13 * This service provides access to cached HTTP authentication
     14 * user credentials (domain, username, password) for sites
     15 * visited during the current browser session.
     16 *
     17 * This interface exists to provide other HTTP stacks with the
     18 * ability to share HTTP authentication credentials with Necko.
     19 * This is currently used by the Java plugin (version 1.5 and
     20 * higher) to avoid duplicate authentication prompts when the
     21 * Java client fetches content from a HTTP site that the user
     22 * has already logged into.
     23 */
     24 [scriptable, builtinclass, uuid(54f90444-c52b-4d2d-8916-c59a2bb25938)]
     25 interface nsIHttpAuthManager : nsISupports
     26 {
     27    /**
     28     * Lookup auth identity.
     29     *
     30     * @param aScheme
     31     *        the URL scheme (e.g., "http").  NOTE: for proxy authentication,
     32     *        this should be "http" (this includes authentication for CONNECT
     33     *        tunneling).
     34     * @param aHost
     35     *        the host of the server issuing a challenge (ASCII only).
     36     * @param aPort
     37     *        the port of the server issuing a challenge.
     38     * @param aAuthType
     39     *        optional string identifying auth type used (e.g., "basic")
     40     * @param aRealm
     41     *        optional string identifying auth realm.
     42     * @param aPath
     43     *        optional string identifying auth path. empty for proxy auth.
     44     * @param aUserDomain
     45     *        return value containing user domain.
     46     * @param aUserName
     47     *        return value containing user name.
     48     * @param aUserPassword
     49     *        return value containing user password.
     50     * @param aIsPrivate
     51     *        whether to look up a private or public identity (they are
     52     *        stored separately, for use by private browsing)
     53     * @param aPrincipal
     54     *        the principal from which to derive information about which
     55     *        app/mozbrowser is in use for this request
     56     */
     57    [must_use] void getAuthIdentity(in ACString aScheme,
     58                                    in ACString aHost,
     59                                    in int32_t  aPort,
     60                                    in ACString aAuthType,
     61                                    in ACString aRealm,
     62                                    in ACString aPath,
     63                                    out AString aUserDomain,
     64                                    out AString aUserName,
     65                                    out AString aUserPassword,
     66                                    [optional] in boolean aIsPrivate,
     67                                    [optional] in nsIPrincipal aPrincipal);
     68 
     69    /**
     70     * Store auth identity.
     71     *
     72     * @param aScheme
     73     *        the URL scheme (e.g., "http").  NOTE: for proxy authentication,
     74     *        this should be "http" (this includes authentication for CONNECT
     75     *        tunneling).
     76     * @param aHost
     77     *        the host of the server issuing a challenge (ASCII only).
     78     * @param aPort
     79     *        the port of the server issuing a challenge.
     80     * @param aAuthType
     81     *        optional string identifying auth type used (e.g., "basic")
     82     * @param aRealm
     83     *        optional string identifying auth realm.
     84     * @param aPath
     85     *        optional string identifying auth path. empty for proxy auth.
     86     * @param aUserDomain
     87     *        optional string containing user domain.
     88     * @param aUserName
     89     *        optional string containing user name.
     90     * @param aUserPassword
     91     *        optional string containing user password.
     92     * @param aIsPrivate
     93     *        whether to store a private or public identity (they are
     94     *        stored separately, for use by private browsing)
     95     * @param aPrincipal
     96     *        the principal from which to derive information about which
     97     *        app/mozbrowser is in use for this request
     98     */
     99    [must_use] void setAuthIdentity(in ACString aScheme,
    100                                    in ACString aHost,
    101                                    in int32_t  aPort,
    102                                    in ACString aAuthType,
    103                                    in ACString aRealm,
    104                                    in ACString aPath,
    105                                    in AString  aUserDomain,
    106                                    in AString  aUserName,
    107                                    in AString  aUserPassword,
    108                                    [optional] in boolean aIsPrivate,
    109                                    [optional] in nsIPrincipal aPrincipal);
    110 
    111    /**
    112     * Clear all auth cache.
    113     */
    114    [must_use] void clearAll();
    115 };