Confirmed users
195
edits
mNo edit summary |
(async interfaces, part I) |
||
Line 12: | Line 12: | ||
The nsIAuthPrompt2 is what necko calls stuff on; nsIPromptService2 is what embeddors would implement. | The nsIAuthPrompt2 is what necko calls stuff on; nsIPromptService2 is what embeddors would implement. | ||
This suggestion is based on https://bugzilla.mozilla.org/attachment.cgi?id=163161 but slightly modified. | This suggestion is based on https://bugzilla.mozilla.org/attachment.cgi?id=163161 but slightly modified, and async calls added. | ||
interface nsIAuthPromptCallback : nsISupports { | |||
/** | |||
* Authentication information is available. | |||
* | |||
* @param aContext | |||
* The context as passed to promptPasswordAsync | |||
* @param user | |||
* The username the user entered (or, if ONLY_PASSWORD was set, | |||
* that was passed to the nsIAuthPrompt2) | |||
* @param password | |||
* The password the user entered. | |||
* @param domain | |||
* The domain name the user entered, if NEED_DOMAIN was set. | |||
* @param flags | |||
* Flags as passed to promptPasswordAsync | |||
* | |||
* @note Any exceptions thrown from this method should be ignored. | |||
*/ | |||
void onAuthAvailable(in nsISupports aContext, | |||
in AString user, | |||
in AString password, | |||
in AString domain, | |||
in unsigned long flags); | |||
/** | |||
* Notification that the prompt was cancelled. | |||
* @param userCancel | |||
* If false, this prompt was cancelled by calling the | |||
* the cancel method on the nsICancelable; otherwise, | |||
* it was cancelled by the user. | |||
*/ | |||
void onAuthCancelled(in boolean userCancel); | |||
}; | |||
interface nsIAuthPrompt2 : nsISupports | interface nsIAuthPrompt2 : nsISupports |