netwerk/protocol/http/nsIHttpAuthenticableChannel.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/. */
     6 #include "nsIProxiedChannel.idl"
     8 interface nsILoadGroup;
     9 interface nsIURI;
    10 interface nsIInterfaceRequestor;
    11 typedef unsigned long nsLoadFlags;
    13 [scriptable, uuid(701093ac-5c7f-429c-99e3-423b041fccb4)]
    14 interface nsIHttpAuthenticableChannel : nsIProxiedChannel
    15 {
    16     /**
    17      * If the channel being authenticated is using SSL.
    18      */
    19     readonly attribute boolean isSSL;
    21     /**
    22      * Returns if the proxy HTTP method used is CONNECT. If no proxy is being
    23      * used it must return PR_FALSE.
    24      */
    25     readonly attribute boolean proxyMethodIsConnect;
    27     /**
    28      * Cancels the current request. See nsIRequest.
    29      */
    30     void cancel(in nsresult aStatus);
    32     /**
    33      * The load flags of this request. See nsIRequest.
    34      */
    35     readonly attribute nsLoadFlags loadFlags;
    37     /**
    38      * The URI corresponding to the channel. See nsIChannel.
    39      */
    40     readonly attribute nsIURI URI;
    42     /**
    43      * The load group of this request. It is here for querying its
    44      * notificationCallbacks. See nsIRequest.
    45      */
    46     readonly attribute nsILoadGroup loadGroup;
    48     /**
    49      * The notification callbacks for the channel. See nsIChannel.
    50      */
    51     readonly attribute nsIInterfaceRequestor notificationCallbacks;
    53     /**
    54      * The HTTP request method. See nsIHttpChannel.
    55      */
    56     readonly attribute ACString requestMethod;
    58     /**
    59      * The "Server" response header.
    60      * Return NS_ERROR_NOT_AVAILABLE if not available.
    61      */
    62     readonly attribute ACString serverResponseHeader;
    64     /**
    65      * The Proxy-Authenticate response header.
    66      */
    67     readonly attribute ACString proxyChallenges;
    69     /**
    70      * The WWW-Authenticate response header.
    71      */
    72     readonly attribute ACString WWWChallenges;
    74     /**
    75      * Sets the Proxy-Authorization request header. An empty string
    76      * will clear it.
    77      */
    78     void setProxyCredentials(in ACString credentials);
    80     /**
    81      * Sets the Authorization request header. An empty string
    82      * will clear it.
    83      */
    84     void setWWWCredentials(in ACString credentials);
    86     /**
    87      * Called when authentication information is ready and has been set on this
    88      * object using setWWWCredentials/setProxyCredentials. Implementations can
    89      * continue with the request and send the given information to the server.
    90      *
    91      * It is called asynchronously from
    92      * nsIHttpChannelAuthProvider::processAuthentication if that method returns
    93      * NS_ERROR_IN_PROGRESS.
    94      *
    95      * @note  Any exceptions thrown from this method should be ignored.
    96      */
    97     void onAuthAvailable();
    99     /**
   100      * Notifies that the prompt was cancelled. It is called asynchronously
   101      * from nsIHttpChannelAuthProvider::processAuthentication if that method
   102      * returns NS_ERROR_IN_PROGRESS.
   103      *
   104      * @param userCancel
   105      *        If the user was cancelled has cancelled the authentication prompt.
   106      */
   107     void onAuthCancelled(in boolean userCancel);
   108 };

mercurial