Top | ![]() |
![]() |
![]() |
![]() |
|
e_oauth2_support_get_access_token_sync () |
|
e_oauth2_support_get_access_token () |
|
e_oauth2_support_get_access_token_finish () |
Support for OAuth 2.0 access tokens is typically provided through
dynamically loaded modules. The module will provide an extension
class which implements the EOAuth2SupportInterface, which can be
plugged into all appropriate EServerSideSource instances through
e_server_side_source_set_oauth2_support()
. Incoming requests for
access tokens are then forwarded to the extension providing OAuth
2.0 support through e_oauth2_support_get_access_token()
.
gboolean e_oauth2_support_get_access_token_sync (EOAuth2Support *support
,ESource *source
,,
GCancellable *cancellable,
gchar **out_access_token,
gint *out_expires_in);
GError **error
Obtains the OAuth 2.0 access token for source
along with its expiry
in seconds from the current time (or 0 if unknown).
Free the returned access token with g_free()
error
and return FALSE
support |
an |
|
source |
an ESource |
|
cancellable |
optional |
|
out_access_token |
return location for the access token, or |
|
out_expires_in |
return location for the token expiry, or |
|
error |
return location for a |
Since: 3.8
void e_oauth2_support_get_access_token (EOAuth2Support *support
,ESource *source
,,
GCancellable *cancellable,
GAsyncReadyCallback callback);
gpointer user_data
Asynchronously obtains the OAuth 2.0 access token for source
along
with its expiry in seconds from the current time (or 0 if unknown).
When the operation is finished, callback
will be called. You can then
call e_oauth2_support_get_access_token_finish()
to get the result of the
operation.
support |
||
source |
an ESource |
|
cancellable |
optional |
|
callback |
a |
|
user_data |
data to pass to the callback function |
Since: 3.8
gboolean e_oauth2_support_get_access_token_finish (EOAuth2Support *support
,,
GAsyncResult *result,
gchar **out_access_token,
gint *out_expires_in);
GError **error
Finishes the operation started with e_oauth2_support_get_access_token()
.
Free the returned access token with g_free()
error
and return FALSE
support |
||
result |
a |
|
out_access_token |
return location for the access token, or |
|
out_expires_in |
return location for the token expiry, or |
|
error |
return location for a |
Since: 3.8
struct EOAuth2SupportInterface { /* Synchronous I/O Methods */ gboolean (*get_access_token_sync) (EOAuth2Support *support, ESource *source, GCancellable *cancellable, gchar **out_access_token, gint *out_expires_in, GError **error); /* Asynchronous I/O Methods (all have defaults) */ void (*get_access_token) (EOAuth2Support *support, ESource *source, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*get_access_token_finish) (EOAuth2Support *support, GAsyncResult *result, gchar **out_access_token, gint *out_expires_in, GError **error); };
Since: 3.8