Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
This interface provides an abstract way to request that the user reauthenticate themselves to the operating system. It may be useful in conjunction with nsIOSKeyStore, whereby consumers of these APIs may consider some secrets too sensitive to access without first reauthenticating the user.
Usage:
// obtain the singleton nsIOSReauthenticator instance const reauthenticator = Cc["@mozilla.org/security/osreauthenticator;1"] .getService(Ci.nsIOSReauthenticator); if (await reauthenticator.asyncReauthenticate()) { // do something only authenticated users are allowed to do... } else { // show a "sorry, this isn't allowed" error }
Asynchronously cause the operating system to request that the user reauthenticate. This is typically in the form of a dialog box asking the user for their login password. The actual behaviour of this depends on the OS.
Promise resolving to true if the user successfully authenticated and false otherwise.
A short string that may be incorporated in the dialog
A short string that may be shown as the dialog caption (usually Product Name)
Used to associate the OS dialog with the calling window.
Generated using TypeDoc
Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.
Returns
The resulting reference count.