TlsInteraction.invokeAskPassword

Invoke the interaction to ask the user for a password. It invokes this interaction in the main loop, specifically the #GMainContext returned by [glib.main_context.MainContext.getThreadDefault] when the interaction is created. This is called by called by #GTlsConnection or #GTlsDatabase to ask the user for a password.

Derived subclasses usually implement a password prompt, although they may also choose to provide a password from elsewhere. The password value will be filled in and then callback will be called. Alternatively the user may abort this password request, which will usually abort the TLS connection.

The implementation can either be a synchronous (eg: modal dialog) or an asynchronous one (eg: modeless dialog). This function will take care of calling which ever one correctly.

If the interaction is cancelled by the cancellation object, or by the user then [gio.types.TlsInteractionResult.Failed] will be returned with an error that contains a [gio.types.IOErrorEnum.Cancelled] error code. Certain implementations may not support immediate cancellation.

Parameters

passworda #GTlsPassword object
cancellablean optional #GCancellable cancellation object

Returns

The status of the ask password interaction.

Throws

[ErrorWrap]