Struct xpcom::interfaces::nsIAuthInformation
[−]
[src]
#[repr(C)]pub struct nsIAuthInformation { /* fields omitted */ }
interface nsIAuthInformation : nsISupports
/**
* A object that hold authentication information. The caller of
* nsIAuthPrompt2::promptUsernameAndPassword or
* nsIAuthPrompt2::promptPasswordAsync provides an object implementing this
* interface; the prompt implementation can then read the values here to prefill
* the dialog. After the user entered the authentication information, it should
* set the attributes of this object to indicate to the caller what was entered
* by the user.
*/
Methods
impl nsIAuthInformation
[src]
pub fn coerce<T: nsIAuthInformationCoerce>(&self) -> &T
[src]
Cast this nsIAuthInformation
to one of its base interfaces.
impl nsIAuthInformation
[src]
pub const AUTH_HOST: i64
AUTH_HOST: i64 = 1
/** @name Flags */
/**
* This dialog belongs to a network host.
*/
pub const AUTH_PROXY: i64
AUTH_PROXY: i64 = 2
/**
* This dialog belongs to a proxy.
*/
pub const NEED_DOMAIN: i64
NEED_DOMAIN: i64 = 4
/**
* This dialog needs domain information. The user interface should show a
* domain field, prefilled with the domain attribute's value.
*/
pub const ONLY_PASSWORD: i64
ONLY_PASSWORD: i64 = 8
/**
* This dialog only asks for password information. Authentication prompts
* SHOULD NOT show a username field. Attempts to change the username field
* will have no effect. nsIAuthPrompt2 implementations should, however, show
* its initial value to the user in some form. For example, a paragraph in
* the dialog might say "Please enter your password for user jsmith at
* server intranet".
*
* This flag is mutually exclusive with #NEED_DOMAIN.
*/
pub const PREVIOUS_FAILED: i64
PREVIOUS_FAILED: i64 = 16
/**
* We have already tried to log in for this channel
* (with auth values from a previous promptAuth call),
* but it failed, so we now ask the user to provide a new, correct login.
*
* @see also RFC 2616, Section 10.4.2
*/
pub const CROSS_ORIGIN_SUB_RESOURCE: i64
CROSS_ORIGIN_SUB_RESOURCE: i64 = 32
/**
* A cross-origin sub-resource requests an authentication.
* The message presented to users must reflect that.
*/
pub unsafe fn GetFlags(&self, aFlags: *mut uint32_t) -> nsresult
[src]
/**
* Flags describing this dialog. A bitwise OR of the flag values
* above.
*
* It is possible that neither #AUTH_HOST nor #AUTH_PROXY are set.
*
* Auth prompts should ignore flags they don't understand; especially, they
* should not throw an exception because of an unsupported flag.
*/
readonly attribute unsigned long flags;
pub unsafe fn GetRealm(&self, aRealm: &mut nsAString) -> nsresult
[src]
/**
* The server-supplied realm of the authentication as defined in RFC 2617.
* Can be the empty string if the protocol does not support realms.
* Otherwise, this is a human-readable string like "Secret files".
*/
readonly attribute AString realm;
pub unsafe fn GetAuthenticationScheme(
&self,
aAuthenticationScheme: &mut nsACString
) -> nsresult
[src]
&self,
aAuthenticationScheme: &mut nsACString
) -> nsresult
/**
* The authentication scheme used for this request, if applicable. If the
* protocol for this authentication does not support schemes, this will be
* the empty string. Otherwise, this will be a string such as "basic" or
* "digest". This string will always be in lowercase.
*/
readonly attribute AUTF8String authenticationScheme;
pub unsafe fn GetUsername(&self, aUsername: &mut nsAString) -> nsresult
[src]
/**
* The initial value should be used to prefill the dialog or be shown
* in some other way to the user.
* On return, this parameter should contain the username entered by
* the user.
* This field can only be changed if the #ONLY_PASSWORD flag is not set.
*/
attribute AString username;
pub unsafe fn SetUsername(&self, aUsername: &nsAString) -> nsresult
[src]
/**
* The initial value should be used to prefill the dialog or be shown
* in some other way to the user.
* On return, this parameter should contain the username entered by
* the user.
* This field can only be changed if the #ONLY_PASSWORD flag is not set.
*/
attribute AString username;
pub unsafe fn GetPassword(&self, aPassword: &mut nsAString) -> nsresult
[src]
/**
* The initial value should be used to prefill the dialog or be shown
* in some other way to the user.
* The password should not be shown in clear.
* On return, this parameter should contain the password entered by
* the user.
*/
attribute AString password;
pub unsafe fn SetPassword(&self, aPassword: &nsAString) -> nsresult
[src]
/**
* The initial value should be used to prefill the dialog or be shown
* in some other way to the user.
* The password should not be shown in clear.
* On return, this parameter should contain the password entered by
* the user.
*/
attribute AString password;
pub unsafe fn GetDomain(&self, aDomain: &mut nsAString) -> nsresult
[src]
/**
* The initial value should be used to prefill the dialog or be shown
* in some other way to the user.
* On return, this parameter should contain the domain entered by
* the user.
* This attribute is only used if flags include #NEED_DOMAIN.
*/
attribute AString domain;
pub unsafe fn SetDomain(&self, aDomain: &nsAString) -> nsresult
[src]
/**
* The initial value should be used to prefill the dialog or be shown
* in some other way to the user.
* On return, this parameter should contain the domain entered by
* the user.
* This attribute is only used if flags include #NEED_DOMAIN.
*/
attribute AString domain;
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 nsIAuthInformation
[src]
const IID: nsIID
IID: nsIID = nsID(225665948, 10898, 17688, [159, 146, 40, 247, 31, 234, 95, 32])
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 nsIAuthInformation
[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 nsIAuthInformation
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.