EBackend.OAuth2Support¶
- Implementations:
Methods¶
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class EBackend.OAuth2Support¶
- Bases:
- Structure:
New in version 3.8.
- get_access_token(source, cancellable, callback, *user_data)¶
- Parameters:
source (
EDataServer.Source) – anEDataServer.Sourcecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – data to pass to the callback function
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) – aGio.AsyncResult- Raises:
- Returns:
- Return type:
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 returnFalse.New in version 3.8.
- get_access_token_sync(source, cancellable)¶
- Parameters:
source (
EDataServer.Source) – anEDataServer.Sourcecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
- Return type:
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 returnFalse.New in version 3.8.
- do_get_access_token(source, cancellable, callback, *user_data) virtual¶
- Parameters:
source (
EDataServer.Source) – anEDataServer.Sourcecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – data to pass to the callback function
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) – aGio.AsyncResult- Returns:
- Return type:
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 returnFalse.New in version 3.8.
- do_get_access_token_sync(source, cancellable) virtual¶
- Parameters:
source (
EDataServer.Source) – anEDataServer.Sourcecancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Returns:
- Return type:
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 returnFalse.New in version 3.8.