EBackend.OAuth2Support¶
| Implementations: | |
|---|---|
| None | |
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: - source (EDataServer.Source) – anEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_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. 
- source (
 - 
get_access_token_finish(result)¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Raises: - GLib.Error- Returns: - Trueon success,- Falseon 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: - source (EDataServer.Source) – anEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Raises: - Returns: - Trueon success,- Falseon 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: - 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. 
- source (
 - 
do_get_access_token(source, cancellable, callback, *user_data) virtual¶
- Parameters: - source (EDataServer.Source) – anEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- callback (Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfied
- user_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. 
- source (
 - 
do_get_access_token_finish(result) virtual¶
- Parameters: - result ( - Gio.AsyncResult) – a- Gio.AsyncResult- Returns: - Trueon success,- Falseon 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: - source (EDataServer.Source) – anEDataServer.Source
- cancellable (Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
 - Returns: - Trueon success,- Falseon 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: - 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. 
- source (
 
-