nsISupports
Last changed in Gecko 1.9 (Firefox 3)This interface is implemented by @mozilla.org/login-manager/prompter;1
. To create an instance, use:
var authPrompt = Components.classes["@mozilla.org/login-manager/prompter;1"] .createInstance(Components.interfaces.nsIAuthPrompt);
boolean prompt(in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, in wstring defaultText, out wstring result); |
boolean promptPassword(in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, inout wstring pwd); |
boolean promptUsernameAndPassword(in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, inout wstring user, inout wstring pwd); |
Constant | Value | Description |
SAVE_PASSWORD_NEVER |
0 |
Never saves the password. |
SAVE_PASSWORD_FOR_SESSION |
1 |
Saves the password for the session. |
SAVE_PASSWORD_PERMANENTLY |
2 |
Saves the password permanently. |
This method puts up a text input dialog with OK and Cancel buttons.
boolean prompt( in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, in wstring defaultText, out wstring result );
dialogTitle
text
passwordRealm
savePassword
defaultText
result
true
for OK, false
for Cancel.
This method puts up a password dialog with OK and Cancel buttons.
boolean promptPassword( in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, inout wstring pwd );
dialogTitle
text
passwordRealm
savePassword
pwd
true
for OK, false
for Cancel.
This method puts up a username/password dialog with OK and Cancel buttons.
boolean promptUsernameAndPassword( in wstring dialogTitle, in wstring text, in wstring passwordRealm, in PRUint32 savePassword, inout wstring user, inout wstring pwd );
dialogTitle
text
passwordRealm
savePassword
user
pwd
true
for OK, false
for Cancel.