Struct xpcom::interfaces::nsIHttpAuthenticator
[−]
[src]
#[repr(C)]pub struct nsIHttpAuthenticator { /* fields omitted */ }
interface nsIHttpAuthenticator : nsISupports
/**
* nsIHttpAuthenticator
*
* Interface designed to allow for pluggable HTTP authentication modules.
* Implementations are registered under the ContractID:
*
* "@mozilla.org/network/http-authenticator;1?scheme=<auth-scheme>"
*
* where <auth-scheme> is the lower-cased value of the authentication scheme
* found in the server challenge per the rules of RFC 2617.
*/
Methods
impl nsIHttpAuthenticator
[src]
pub fn coerce<T: nsIHttpAuthenticatorCoerce>(&self) -> &T
[src]
Cast this nsIHttpAuthenticator
to one of its base interfaces.
impl nsIHttpAuthenticator
[src]
pub const USING_INTERNAL_IDENTITY: i64
USING_INTERNAL_IDENTITY: i64 = 1
/**
* Generate flags
*/
/**
* Indicates that the authenticator has used an out-of-band or internal
* source of identity and tells the consumer that it must not cache
* the returned identity because it might not be valid and would overwrite
* the cached identity. See bug 542318 comment 32.
*/
pub const REQUEST_BASED: i64
REQUEST_BASED: i64 = 1
/**
* A request based authentication scheme only authenticates an individual
* request (or a set of requests under the same authentication domain as
* defined by RFC 2617). BASIC and DIGEST are request based authentication
* schemes.
*/
pub const CONNECTION_BASED: i64
CONNECTION_BASED: i64 = 2
/**
* A connection based authentication scheme authenticates an individual
* connection. Multiple requests may be issued over the connection without
* repeating the authentication steps. Connection based authentication
* schemes can associate state with the connection being authenticated via
* the aContinuationState parameter (see generateCredentials).
*/
pub const REUSABLE_CREDENTIALS: i64
REUSABLE_CREDENTIALS: i64 = 4
/**
* The credentials returned from generateCredentials may be reused with any
* other URLs within "the protection space" as defined by RFC 2617 section
* 1.2. If this flag is not set, then generateCredentials must be called
* for each request within the protection space. REUSABLE_CREDENTIALS
* implies REUSABLE_CHALLENGE.
*/
pub const REUSABLE_CHALLENGE: i64
REUSABLE_CHALLENGE: i64 = 8
/**
* A challenge may be reused to later generate credentials in anticipation
* of a duplicate server challenge for URLs within "the protection space"
* as defined by RFC 2617 section 1.2.
*/
pub const IDENTITY_IGNORED: i64
IDENTITY_IGNORED: i64 = 1024
/**
* This flag indicates that the identity of the user is not required by
* this authentication scheme.
*/
pub const IDENTITY_INCLUDES_DOMAIN: i64
IDENTITY_INCLUDES_DOMAIN: i64 = 2048
/**
* This flag indicates that the identity of the user includes a domain
* attribute that the user must supply.
*/
pub const IDENTITY_ENCRYPTED: i64
IDENTITY_ENCRYPTED: i64 = 4096
/**
* This flag indicates that the identity will be sent encrypted. It does
* not make sense to combine this flag with IDENTITY_IGNORED.
*/
pub unsafe fn ChallengeReceived(
&self,
aChannel: *const nsIHttpAuthenticableChannel,
aChallenge: *const c_char,
aProxyAuth: bool,
aSessionState: *mut *const nsISupports,
aContinuationState: *mut *const nsISupports,
aInvalidatesIdentity: *mut bool
) -> nsresult
[src]
&self,
aChannel: *const nsIHttpAuthenticableChannel,
aChallenge: *const c_char,
aProxyAuth: bool,
aSessionState: *mut *const nsISupports,
aContinuationState: *mut *const nsISupports,
aInvalidatesIdentity: *mut bool
) -> nsresult
/**
* 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.
*
* @param aChannel
* the http channel that received the challenge.
* @param aChallenge
* the challenge from the WWW-Authenticate/Proxy-Authenticate
* server response header. (possibly from the auth cache.)
* @param aProxyAuth
* flag indicating whether or not aChallenge is from a proxy.
* @param aSessionState
* see description below for generateCredentials.
* @param aContinuationState
* see description below for generateCredentials.
* @param aInvalidateIdentity
* return value indicating whether or not to prompt the user for a
* revised identity.
*/
[must_use] void challengeReceived (in nsIHttpAuthenticableChannel aChannel, in string aChallenge, in boolean aProxyAuth, inout nsISupports aSessionState, inout nsISupports aContinuationState, out boolean aInvalidatesIdentity);
pub unsafe fn GenerateCredentialsAsync(
&self,
aChannel: *const nsIHttpAuthenticableChannel,
aCallback: *const nsIHttpAuthenticatorCallback,
aChallenge: *const c_char,
aProxyAuth: bool,
aDomain: *const int16_t,
aUser: *const int16_t,
aPassword: *const int16_t,
aSessionState: *const nsISupports,
aContinuationState: *const nsISupports,
aCancel: *mut *const nsICancelable
) -> nsresult
[src]
&self,
aChannel: *const nsIHttpAuthenticableChannel,
aCallback: *const nsIHttpAuthenticatorCallback,
aChallenge: *const c_char,
aProxyAuth: bool,
aDomain: *const int16_t,
aUser: *const int16_t,
aPassword: *const int16_t,
aSessionState: *const nsISupports,
aContinuationState: *const nsISupports,
aCancel: *mut *const nsICancelable
) -> nsresult
/**
* 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.
*
* @param aChannel
* the http channel requesting credentials
* @param aCallback
* callback function to be called when credentials are available
* @param aChallenge
* the challenge from the WWW-Authenticate/Proxy-Authenticate
* server response header. (possibly from the auth cache.)
* @param aProxyAuth
* flag indicating whether or not aChallenge is from a proxy.
* @param aDomain
* string containing the domain name (if appropriate)
* @param aUser
* string containing the user name
* @param aPassword
* string containing the password
* @param aSessionState
* 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.
* @param aContinuationState
* 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.
* @pram aCancel
* returns cancellable runnable object which caller can use to cancel
* calling aCallback when finished.
*/
[must_use] void generateCredentialsAsync (in nsIHttpAuthenticableChannel aChannel, in nsIHttpAuthenticatorCallback aCallback, in string aChallenge, in boolean aProxyAuth, in wstring aDomain, in wstring aUser, in wstring aPassword, in nsISupports aSessionState, in nsISupports aContinuationState, out nsICancelable aCancel);
pub unsafe fn GenerateCredentials(
&self,
aChannel: *const nsIHttpAuthenticableChannel,
aChallenge: *const c_char,
aProxyAuth: bool,
aDomain: *const int16_t,
aUser: *const int16_t,
aPassword: *const int16_t,
aSessionState: *mut *const nsISupports,
aContinuationState: *mut *const nsISupports,
aFlags: *mut uint32_t,
_retval: *mut *const c_char
) -> nsresult
[src]
&self,
aChannel: *const nsIHttpAuthenticableChannel,
aChallenge: *const c_char,
aProxyAuth: bool,
aDomain: *const int16_t,
aUser: *const int16_t,
aPassword: *const int16_t,
aSessionState: *mut *const nsISupports,
aContinuationState: *mut *const nsISupports,
aFlags: *mut uint32_t,
_retval: *mut *const c_char
) -> nsresult
/**
* 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.
*
* @param aChannel
* the http channel requesting credentials
* @param aChallenge
* the challenge from the WWW-Authenticate/Proxy-Authenticate
* server response header. (possibly from the auth cache.)
* @param aProxyAuth
* flag indicating whether or not aChallenge is from a proxy.
* @param aDomain
* string containing the domain name (if appropriate)
* @param aUser
* string containing the user name
* @param aPassword
* string containing the password
* @param aSessionState
* 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.
* @param aContinuationState
* 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.
* @param aFlags
* authenticator may return one of the generate flags bellow.
*/
[must_use] string generateCredentials (in nsIHttpAuthenticableChannel aChannel, in string aChallenge, in boolean aProxyAuth, in wstring aDomain, in wstring aUser, in wstring aPassword, inout nsISupports aSessionState, inout nsISupports aContinuationState, out unsigned long aFlags);
pub unsafe fn GetAuthFlags(&self, aAuthFlags: *mut uint32_t) -> nsresult
[src]
/**
* Flags defining various properties of the authenticator.
*/
[must_use] readonly attribute unsigned long authFlags;
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIHttpAuthenticator
[src]
const IID: nsIID
IID: nsIID = nsID(4277656458, 42210, 18897, [150, 133, 25, 237, 126, 48, 155, 125])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIHttpAuthenticator
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIHttpAuthenticator
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.