EBackend.OAuth2Support

g EBackend.OAuth2Support EBackend.OAuth2Support GObject.GInterface GObject.GInterface GObject.GInterface->EBackend.OAuth2Support

Implementations:

EBackend.SourceRegistryServer

Methods

get_access_token (source, cancellable, callback, *user_data)

get_access_token_finish (result)

get_access_token_sync (source, cancellable)

Virtual Methods

do_get_access_token (source, cancellable, callback, *user_data)

do_get_access_token_finish (result)

do_get_access_token_sync (source, cancellable)

Properties

None

Signals

None

Fields

None

Class Details

class EBackend.OAuth2Support
Bases:

GObject.GInterface

Structure:

EBackend.OAuth2SupportInterface

New in version 3.8.

get_access_token(source, cancellable, callback, *user_data)
Parameters:

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 EBackend.OAuth2Support.get_access_token_finish() to get the result of the operation.

New in version 3.8.

get_access_token_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False on failure

out_access_token:

return location for the access token, or None

out_expires_in:

return location for the token expiry, or None

Return type:

(bool, out_access_token: str, out_expires_in: int)

Finishes the operation started with EBackend.OAuth2Support.get_access_token().

Free the returned access token with GLib.free() when finished with it. If an error occurred, the function will set error and return False.

New in version 3.8.

get_access_token_sync(source, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True on success, False on failure

out_access_token:

return location for the access token, or None

out_expires_in:

return location for the token expiry, or None

Return type:

(bool, out_access_token: str, out_expires_in: int)

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 GLib.free() when finished with it. If an error occurs, the function will set error and return False.

New in version 3.8.

do_get_access_token(source, cancellable, callback, *user_data) virtual
Parameters:

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 EBackend.OAuth2Support.get_access_token_finish() to get the result of the operation.

New in version 3.8.

do_get_access_token_finish(result) virtual
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Returns:

True on success, False on failure

out_access_token:

return location for the access token, or None

out_expires_in:

return location for the token expiry, or None

Return type:

(bool, out_access_token: str, out_expires_in: int)

Finishes the operation started with EBackend.OAuth2Support.get_access_token().

Free the returned access token with GLib.free() when finished with it. If an error occurred, the function will set error and return False.

New in version 3.8.

do_get_access_token_sync(source, cancellable) virtual
Parameters:
Returns:

True on success, False on failure

out_access_token:

return location for the access token, or None

out_expires_in:

return location for the token expiry, or None

Return type:

(bool, out_access_token: str, out_expires_in: int)

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 GLib.free() when finished with it. If an error occurs, the function will set error and return False.

New in version 3.8.