Readonly
authFlags defining various properties of the authenticator.
Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Upon receipt of a server challenge, this function is called to determine whether or not the current user identity has been rejected. If true, then the user will be prompted by the channel to enter (or revise) their identity. Following this, generateCredentials will be called.
If the IDENTITY_IGNORED auth flag is set, then the aInvalidateIdentity return value will be ignored, and user prompting will be suppressed.
the http channel that received the challenge.
the challenge from the WWW-Authenticate/Proxy-Authenticate server response header. (possibly from the auth cache.)
flag indicating whether or not aChallenge is from a proxy.
see description below for generateCredentials.
see description below for generateCredentials.
Called to generate the authentication credentials for a particular server/proxy challenge. This is the value that will be sent back to the server via an Authorization/Proxy-Authorization header.
This function may be called using a cached challenge provided the authenticator sets the REUSABLE_CHALLENGE flag.
the http channel requesting credentials
the challenge from the WWW-Authenticate/Proxy-Authenticate server response header. (possibly from the auth cache.)
flag indicating whether or not aChallenge is from a proxy.
string containing the domain name (if appropriate)
string containing the user name
string containing the password
state stored along side the user's identity in the auth cache for the lifetime of the browser session. if a new auth cache entry is created for this challenge, then this parameter will be null. on return, the result will be stored in the new auth cache entry. this parameter is non-null when an auth cache entry is being reused.
state held by the channel between consecutive calls to generateCredentials, assuming multiple calls are required to authenticate. this state is held for at most the lifetime of the channel.
authenticator may return one of the generate flags bellow.
Called to generate the authentication credentials for a particular server/proxy challenge asynchronously. Credentials will be sent back to the server via an Authorization/Proxy-Authorization header.
aCancel returns cancellable runnable object which caller can use to cancel calling aCallback when finished.
the http channel requesting credentials
callback function to be called when credentials are available
the challenge from the WWW-Authenticate/Proxy-Authenticate server response header. (possibly from the auth cache.)
flag indicating whether or not aChallenge is from a proxy.
string containing the domain name (if appropriate)
string containing the user name
string containing the password
state stored along side the user's identity in the auth cache for the lifetime of the browser session. if a new auth cache entry is created for this challenge, then this parameter will be null. on return, the result will be stored in the new auth cache entry. this parameter is non-null when an auth cache entry is being reused. currently modification of session state is not communicated to caller, thus caching credentials obtained by asynchronous way is not supported.
state held by the channel between consecutive calls to generateCredentials, assuming multiple calls are required to authenticate. this state is held for at most the lifetime of the channel.
Generated using TypeDoc
nsIHttpAuthenticator
Interface designed to allow for pluggable HTTP authentication modules. Implementations are registered under the ContractID:
"@mozilla.org/network/http-authenticator;1?scheme="
where is the lower-cased value of the authentication scheme
found in the server challenge per the rules of RFC 2617.