nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)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.
Attributes
Attribute | Type | Description |
authenticationScheme | AUTF8String | 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. Read only. |
domain | AString | 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 . |
flags | unsigned long | Flags describing this dialog. A bitwise OR of the constants. It is possible that neither # |
password | AString | 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. |
realm | AString | 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". Read only. |
username | AString | 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. |
Constants
Constant | Value | Description |
AUTH_HOST | 1 | This dialog belongs to a network host. |
AUTH_PROXY | 2 | This dialog belongs to a proxy. |
NEED_DOMAIN | 4 | This dialog needs domain information. The user interface should show a domain field, prefilled with the domain attributes value. |
ONLY_PASSWORD | 8 | This dialog only asks for NEED_DOMAIN . |
PREVIOUS_FAILED | 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. |