get_access_token_sync


Description:

public abstract bool get_access_token_sync (Source source, Cancellable? cancellable, out string out_access_token, out int out_expires_in) throws 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 when finished with it. If an error occurs, the function will set throws and return false.

Parameters:

this

an OAuth2Support

source

an Source

cancellable

optional Cancellable object, or null

out_access_token

return location for the access token, or null

out_expires_in

return location for the token expiry, or null

Returns:

true on success, false on failure