Method
EBackendBackendcredentials_required_sync
since: 3.16
Declaration [src]
gboolean
e_backend_credentials_required_sync (
EBackend* backend,
ESourceCredentialsReason reason,
const gchar* certificate_pem,
GTlsCertificateFlags certificate_errors,
const GError* op_error,
GCancellable* cancellable,
GError** error
)
Description [src]
Synchronously lets the clients know that the backned requires credentials to be properly opened. It’s a proxy function for e_source_invoke_credentials_required_sync(), where can be found more information about actual parameters meaning.
The provided credentials are received through EBackendClass.authenticate_sync()
method asynchronously.
Note for sources authenticating with OAuth2: their credentials cannot be
looked up silently, thus this call always ends in an interactive prompt
(an OAuth2 consent window in the client). A backend whose source uses
OAuth2 should call e_backend_schedule_authenticate() with NULL credentials
instead and obtain the access token in its EBackendClass.authenticate_sync()
implementation, for example with e_source_get_oauth2_access_token_sync(),
invoking the credentials-required only when that fails.
If an error occurs, the function sets error and returns FALSE.
Available since: 3.16
Parameters
reason-
Type:
ESourceCredentialsReasonAn
ESourceCredentialsReason, why the credentials are required. certificate_pem-
Type:
const gchar*PEM-encoded secure connection certificate, or an empty string.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. certificate_errors-
Type:
GTlsCertificateFlagsA bit-or of
GTlsCertificateFlagsfor secure connection certificate. op_error-
Type:
GErrorA
GErrorwith a description of the previous credentials error, orNULL.The argument can be NULL.The data is owned by the caller of the method. cancellable-
Type:
GCancellableOptional
GCancellableobject, orNULL.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 aNULLGError*.The argument will be left initialized to NULLby 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.