netwerk/protocol/http/nsIHttpAuthManager.idl

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial