### Method

# EDataServerUI CredentialsPrompter loop_prompt_sync

since: 3.16

#### Declaration [src]

    gboolean
    e_credentials_prompter_loop_prompt_sync (
      ECredentialsPrompter* prompter,
      ESource* source,
      ECredentialsPrompterPromptFlags flags,
      ECredentialsPrompterLoopPromptFunc func,
      gpointer user_data,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Runs a credentials prompt loop for `source`, as long as the `func` doesn’t indicate that the provided credentials can be used to successfully authenticate against `source`‘s server, or that the `func` returns `FALSE`. The loop is also teminated when a used cancels the credentials prompt or the `cancellable` is cancelled, though not sooner than the credentials prompt dialog is closed.

Note: The function doesn’t return until the loop is terminated, either successfully or unsuccessfully. The function can be called from any thread, though a dedicated thread is preferred.

Available since: 3.16

#### Parameters

`source`

  Type: `ESource`

  An `ESource` to be prompted credentials for.

  The data is owned by the caller of the method.

`flags`

  Type: `ECredentialsPrompterPromptFlags`

  A bit-or of `ECredentialsPrompterPromptFlags` initial flags.

`func`

  Type: `ECredentialsPrompterLoopPromptFunc`

  An `ECredentialsPrompterLoopPromptFunc` user function to call to check provided credentials.

`user_data`

  Type: `gpointer`

  User data to pass to `func`.

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

`cancellable`

  Type: `GCancellable`

  An optional `GCancellable`, or `NULL`.

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

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE`, when the credentials were provided successfully and they can be used to authenticate the `source`; `FALSE` otherwise.