Struct xpcom::interfaces::nsIAuthModule
[−]
[src]
#[repr(C)]pub struct nsIAuthModule { /* fields omitted */ }
interface nsIAuthModule : nsISupports
Methods
impl nsIAuthModule
[src]
pub fn coerce<T: nsIAuthModuleCoerce>(&self) -> &T
[src]
Cast this nsIAuthModule
to one of its base interfaces.
impl nsIAuthModule
[src]
pub const REQ_DEFAULT: i64
REQ_DEFAULT: i64 = 0
/**
* Default behavior.
*/
pub const REQ_MUTUAL_AUTH: i64
REQ_MUTUAL_AUTH: i64 = 1
/**
* Client and server will be authenticated.
*/
pub const REQ_DELEGATE: i64
REQ_DELEGATE: i64 = 2
/**
* The server is allowed to impersonate the client. The REQ_MUTUAL_AUTH
* flag may also need to be specified in order for this flag to take
* effect.
*/
pub const REQ_PROXY_AUTH: i64
REQ_PROXY_AUTH: i64 = 4
/**
* The authentication is required for a proxy connection.
*/
pub const NTLM_MODULE_SAMBA_AUTH_PROXY: i64
NTLM_MODULE_SAMBA_AUTH_PROXY: i64 = 0
/**
* Flags used for telemetry.
*/
pub const NTLM_MODULE_SAMBA_AUTH_DIRECT: i64
NTLM_MODULE_SAMBA_AUTH_DIRECT: i64 = 1
pub const NTLM_MODULE_WIN_API_PROXY: i64
NTLM_MODULE_WIN_API_PROXY: i64 = 2
pub const NTLM_MODULE_WIN_API_DIRECT: i64
NTLM_MODULE_WIN_API_DIRECT: i64 = 3
pub const NTLM_MODULE_GENERIC_PROXY: i64
NTLM_MODULE_GENERIC_PROXY: i64 = 4
pub const NTLM_MODULE_GENERIC_DIRECT: i64
NTLM_MODULE_GENERIC_DIRECT: i64 = 5
pub const NTLM_MODULE_KERBEROS_PROXY: i64
NTLM_MODULE_KERBEROS_PROXY: i64 = 6
pub const NTLM_MODULE_KERBEROS_DIRECT: i64
NTLM_MODULE_KERBEROS_DIRECT: i64 = 7
pub unsafe fn Init(
&self,
aServiceName: *const c_char,
aServiceFlags: uint32_t,
aDomain: *const int16_t,
aUsername: *const int16_t,
aPassword: *const int16_t
) -> nsresult
[src]
&self,
aServiceName: *const c_char,
aServiceFlags: uint32_t,
aDomain: *const int16_t,
aUsername: *const int16_t,
aPassword: *const int16_t
) -> nsresult
/** Other flags may be defined in the future */
/**
* Called to initialize an auth module. The other methods cannot be called
* unless this method succeeds.
*
* @param aServiceName
* the service name, which may be null if not applicable (e.g., for
* NTLM, this parameter should be null).
* @param aServiceFlags
* a bitwise-or of the REQ_ flags defined above (pass REQ_DEFAULT
* for default behavior).
* @param aDomain
* the authentication domain, which may be null if not applicable.
* @param aUsername
* the user's login name
* @param aPassword
* the user's password
*/
void init (in string aServiceName, in unsigned long aServiceFlags, in wstring aDomain, in wstring aUsername, in wstring aPassword);
pub unsafe fn GetNextToken(
&self,
aInToken: *const c_void,
aInTokenLength: uint32_t,
aOutToken: *mut *mut c_void,
aOutTokenLength: *mut uint32_t
) -> nsresult
[src]
&self,
aInToken: *const c_void,
aInTokenLength: uint32_t,
aOutToken: *mut *mut c_void,
aOutTokenLength: *mut uint32_t
) -> nsresult
/**
* Called to get the next token in a sequence of authentication steps.
*
* @param aInToken
* A buffer containing the input token (e.g., a challenge from a
* server). This may be null.
* @param aInTokenLength
* The length of the input token.
* @param aOutToken
* If getNextToken succeeds, then aOutToken will point to a buffer
* to be sent in response to the server challenge. The length of
* this buffer is given by aOutTokenLength. The buffer at aOutToken
* must be recycled with a call to free.
* @param aOutTokenLength
* If getNextToken succeeds, then aOutTokenLength contains the
* length of the buffer (number of bytes) pointed to by aOutToken.
*/
void getNextToken ([const] in voidPtr aInToken, in unsigned long aInTokenLength, out voidPtr aOutToken, out unsigned long aOutTokenLength);
pub unsafe fn Wrap(
&self,
aInToken: *const c_void,
aInTokenLength: uint32_t,
confidential: bool,
aOutToken: *mut *mut c_void,
aOutTokenLength: *mut uint32_t
) -> nsresult
[src]
&self,
aInToken: *const c_void,
aInTokenLength: uint32_t,
confidential: bool,
aOutToken: *mut *mut c_void,
aOutTokenLength: *mut uint32_t
) -> nsresult
/**
* Once a security context has been established through calls to GetNextToken()
* it may be used to protect data exchanged between client and server. Calls
* to Wrap() are used to protect items of data to be sent to the server.
*
* @param aInToken
* A buffer containing the data to be sent to the server
* @param aInTokenLength
* The length of the input token
* @param confidential
* If set to true, Wrap() will encrypt the data, otherwise data will
* just be integrity protected (checksummed)
* @param aOutToken
* A buffer containing the resulting data to be sent to the server
* @param aOutTokenLength
* The length of the output token buffer
*
* Wrap() may return NS_ERROR_NOT_IMPLEMENTED, if the underlying authentication
* mechanism does not support security layers.
*/
void wrap ([const] in voidPtr aInToken, in unsigned long aInTokenLength, in boolean confidential, out voidPtr aOutToken, out unsigned long aOutTokenLength);
pub unsafe fn Unwrap(
&self,
aInToken: *const c_void,
aInTokenLength: uint32_t,
aOutToken: *mut *mut c_void,
aOutTokenLength: *mut uint32_t
) -> nsresult
[src]
&self,
aInToken: *const c_void,
aInTokenLength: uint32_t,
aOutToken: *mut *mut c_void,
aOutTokenLength: *mut uint32_t
) -> nsresult
/**
* Unwrap() is used to unpack, decrypt, and verify the checksums on data
* returned by a server when security layers are in use.
*
* @param aInToken
* A buffer containing the data received from the server
* @param aInTokenLength
* The length of the input token
* @param aOutToken
* A buffer containing the plaintext data from the server
* @param aOutTokenLength
* The length of the output token buffer
*
* Unwrap() may return NS_ERROR_NOT_IMPLEMENTED, if the underlying
* authentication mechanism does not support security layers.
*/
void unwrap ([const] in voidPtr aInToken, in unsigned long aInTokenLength, out voidPtr aOutToken, out unsigned long aOutTokenLength);
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 nsIAuthModule
[src]
const IID: nsIID
IID: nsIID = nsID(1849023424, 18927, 20012, [177, 234, 183, 46, 198, 68, 80, 162])
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 nsIAuthModule
[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 nsIAuthModule
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.