Interface nsIHttpChannelAuthProviderType

nsIHttpChannelAuthProvider

This interface is intended for providing authentication for http-style channels, like nsIHttpChannel and nsIWebSocket, which implement the nsIHttpAuthenticableChannel interface.

When requesting pages AddAuthorizationHeaders MUST be called in order to get the http cached headers credentials. When the request is unsuccessful because of receiving either a 401 or 407 http response code ProcessAuthentication MUST be called and the page MUST be requested again with the new credentials that the user has provided. After a successful request, checkForSuperfluousAuth MAY be called, and disconnect MUST be called.

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Add credentials from the http auth cache.

    Parameters

    • dontUseCachedWWWCreds: boolean

      When true, the method will not add any Authorization headers from the auth cache.

    Returns void

  • Call this method to request that this object abort whatever operation it may be performing.

    Parameters

    • aReason: number

      Pass a failure code to indicate the reason why this operation is being canceled. It is an error to pass a success code.

    Returns void

  • Check if an unnecessary(and maybe malicious) url authentication has been provided.

    Returns void

  • Clear the proxy ident to not consider it invalid on re-athentication. Called when the channel finds out its transaction has been internally restarted.

    Returns void

  • Cancel pending user auth prompts and release the callback and channel weak references.

    Parameters

    • status: number

    Returns void

  • Initializes the http authentication support for the channel. Implementations must hold a weak reference of the channel.

    Parameters

    • channel: nsIHttpAuthenticableChannel

    Returns void

  • Upon receipt of a server challenge, this function is called to determine the credentials to send.

    Returns

    NS_OK if the credentials were got and set successfully. NS_ERROR_IN_PROGRESS if the credentials are going to be asked to the user. The channel reference must be alive until the feedback from nsIHttpAuthenticableChannel's methods or until disconnect be called.

    Parameters

    • httpStatus: number

      the http status received.

    • sslConnectFailed: boolean

      if the last ssl tunnel connection attempt was or not successful.

    Returns void

Generated using TypeDoc