Gio.TlsInteraction.prototype.ask_password_async

function ask_password_async(password: Gio.TlsPassword, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void {
    // Gjs wrapper for g_tls_interaction_ask_password_async()
}
  

Run asynchronous interaction to ask the user for a password. In general, Gio.TlsInteraction.prototype.invoke_ask_password should be used instead of this function.

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.

If the interaction is cancelled by the cancellation object, or by the user then Gio.TlsInteractionResult.failed will be returned with an error that contains a Gio.IOErrorEnum.cancelled error code. Certain implementations may not support immediate cancellation.

Certain implementations may not support immediate cancellation.

Since 2.30

password

a Gio.TlsPassword object

cancellable

an optional Gio.Cancellable cancellation object

callback

will be called when the interaction completes