Gio.TlsInteraction.ask_password_async
Description: Reference for Gio.TlsInteraction.ask_password_async

### Virtual Method

# Gio TlsInteractionask_password_async

since: 2.30

#### Declaration

    void
    ask_password_async (
      GTlsInteraction* interaction,
      GTlsPassword* password,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description

Run asynchronous interaction to ask the user for a password. In general, `g_tls_interaction_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 `G_TLS_INTERACTION_FAILED` will be returned with an error that contains a `G_IO_ERROR_CANCELLED` error code. Certain implementations may not support immediate cancellation.

Certain implementations may not support immediate cancellation.

Available since: 2.30

#### Parameters

`password`

  Type: `GTlsPassword`

  A `GTlsPassword` object.

  The data is owned by the caller of the function.

`cancellable`

  Type: `GCancellable`

  An optional `GCancellable` cancellation object.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`callback`

  Type: `GAsyncReadyCallback`

  Will be called when the interaction completes.

`user_data`

  Type: `gpointer`

  Data to pass to the `callback`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.