nsIAuthPrompt2
| IID: | 447fc780-1d28-412a-91a1-466d48129c65 |
| Inherits From: | nsISupports |
An interface allowing to prompt for a username and password. This interface is usually acquired using getInterface on notification callbacks or similar. It can be used to prompt users for authentication information, either synchronously or asynchronously.
This interface is implemented by the following components:
Constants
Methods
nsICancelable asyncPromptAuth ( nsIChannel channel , nsIAuthPromptCallback callback , nsISupports context , PRUint32 level , nsIAuthInformation authInfo )
PRBool promptAuth ( nsIChannel channel , PRUint32 level , nsIAuthInformation authInfo )
nsICancelable asyncPromptAuth ( nsIChannel channel , nsIAuthPromptCallback callback , nsISupports context , PRUint32 level , nsIAuthInformation authInfo )
Asynchronously prompt the user for a username and password. This has largely the same semantics as promptUsernameAndPassword(), but must return immediately after calling and return the entered data in a callback.
If the user closes the dialog using a cancel button or similar, the callback's nsIAuthPromptCallback::onAuthCancelled method must be called. Calling nsICancelable::cancel on the returned object SHOULD close the dialog and MUST call nsIAuthPromptCallback::onAuthCancelled on the provided callback.
- Arguments:
- channel
- callback
- context
- level
- authInfo
PRBool promptAuth ( nsIChannel channel , PRUint32 level , nsIAuthInformation authInfo )
Requests a username and a password. Implementations will commonly show a dialog with a username and password field, depending on flags also a domain field.
- Arguments:
- channel: The channel that requires authentication.
- level: One of the level constants from above. See there for descriptions of the levels.
- authInfo: Authentication information object. The implementation should fill in this object with the information entered by the user before returning.
References
This interface is returned from the following methods:
nsIAuthPromptAdapterFactory.createAdapter
Reference documentation is generated from Mozilla's source.
