netwerk/protocol/http/nsIHttpAuthManager.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/protocol/http/nsIHttpAuthManager.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,115 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIPrincipal;
    1.12 +
    1.13 +/**
    1.14 + * nsIHttpAuthManager
    1.15 + *
    1.16 + * This service provides access to cached HTTP authentication
    1.17 + * user credentials (domain, username, password) for sites
    1.18 + * visited during the current browser session.
    1.19 + *
    1.20 + * This interface exists to provide other HTTP stacks with the
    1.21 + * ability to share HTTP authentication credentials with Necko.
    1.22 + * This is currently used by the Java plugin (version 1.5 and
    1.23 + * higher) to avoid duplicate authentication prompts when the
    1.24 + * Java client fetches content from a HTTP site that the user
    1.25 + * has already logged into.
    1.26 + */
    1.27 +[scriptable, uuid(54f90444-c52b-4d2d-8916-c59a2bb25938)]
    1.28 +interface nsIHttpAuthManager : nsISupports
    1.29 +{
    1.30 +    /**
    1.31 +     * Lookup auth identity.
    1.32 +     *
    1.33 +     * @param aScheme
    1.34 +     *        the URL scheme (e.g., "http").  NOTE: for proxy authentication,
    1.35 +     *        this should be "http" (this includes authentication for CONNECT
    1.36 +     *        tunneling).
    1.37 +     * @param aHost
    1.38 +     *        the host of the server issuing a challenge (ASCII only).
    1.39 +     * @param aPort
    1.40 +     *        the port of the server issuing a challenge.
    1.41 +     * @param aAuthType
    1.42 +     *        optional string identifying auth type used (e.g., "basic")
    1.43 +     * @param aRealm
    1.44 +     *        optional string identifying auth realm.
    1.45 +     * @param aPath
    1.46 +     *        optional string identifying auth path. empty for proxy auth.
    1.47 +     * @param aUserDomain
    1.48 +     *        return value containing user domain.
    1.49 +     * @param aUserName
    1.50 +     *        return value containing user name.
    1.51 +     * @param aUserPassword
    1.52 +     *        return value containing user password.
    1.53 +     * @param aIsPrivate
    1.54 +     *        whether to look up a private or public identity (they are
    1.55 +     *        stored separately, for use by private browsing)
    1.56 +     * @param aPrincipal
    1.57 +     *        the principal from which to derive information about which
    1.58 +     *        app/mozbrowser is in use for this request
    1.59 +     */
    1.60 +    void getAuthIdentity(in ACString aScheme,
    1.61 +                         in ACString aHost,
    1.62 +                         in int32_t  aPort,
    1.63 +                         in ACString aAuthType,
    1.64 +                         in ACString aRealm,
    1.65 +                         in ACString aPath,
    1.66 +                         out AString aUserDomain,
    1.67 +                         out AString aUserName,
    1.68 +                         out AString aUserPassword,
    1.69 +                         [optional] in bool aIsPrivate,
    1.70 +                         [optional] in nsIPrincipal aPrincipal);
    1.71 +
    1.72 +    /**
    1.73 +     * Store auth identity.
    1.74 +     *
    1.75 +     * @param aScheme
    1.76 +     *        the URL scheme (e.g., "http").  NOTE: for proxy authentication,
    1.77 +     *        this should be "http" (this includes authentication for CONNECT
    1.78 +     *        tunneling).
    1.79 +     * @param aHost
    1.80 +     *        the host of the server issuing a challenge (ASCII only).
    1.81 +     * @param aPort
    1.82 +     *        the port of the server issuing a challenge.
    1.83 +     * @param aAuthType
    1.84 +     *        optional string identifying auth type used (e.g., "basic")
    1.85 +     * @param aRealm
    1.86 +     *        optional string identifying auth realm.
    1.87 +     * @param aPath
    1.88 +     *        optional string identifying auth path. empty for proxy auth.
    1.89 +     * @param aUserDomain
    1.90 +     *        optional string containing user domain.
    1.91 +     * @param aUserName
    1.92 +     *        optional string containing user name.
    1.93 +     * @param aUserPassword
    1.94 +     *        optional string containing user password.
    1.95 +     * @param aIsPrivate
    1.96 +     *        whether to store a private or public identity (they are
    1.97 +     *        stored separately, for use by private browsing)
    1.98 +     * @param aPrincipal
    1.99 +     *        the principal from which to derive information about which
   1.100 +     *        app/mozbrowser is in use for this request
   1.101 +     */
   1.102 +    void setAuthIdentity(in ACString aScheme,
   1.103 +                         in ACString aHost,
   1.104 +                         in int32_t  aPort,
   1.105 +                         in ACString aAuthType,
   1.106 +                         in ACString aRealm,
   1.107 +                         in ACString aPath,
   1.108 +                         in AString  aUserDomain,
   1.109 +                         in AString  aUserName,
   1.110 +                         in AString  aUserPassword,
   1.111 +                         [optional] in boolean aIsPrivate,
   1.112 +                         [optional] in nsIPrincipal aPrincipal);
   1.113 +
   1.114 +    /**
   1.115 +     * Clear all auth cache.
   1.116 +     */
   1.117 +    void clearAll();
   1.118 +};

mercurial