get_access_token_sync


Description:

public bool get_access_token_sync (Source source, OAuth2ServiceRefSourceFunc ref_source, out string out_access_token, out int out_expires_in, Cancellable? cancellable = null) throws Error

Reads access token information from the secret store for the source and in case it's expired it refreshes the token, if possible.

Free the returned out_access_token with g_free, when no longer needed.

Parameters:

this

an OAuth2Service

source

an Source

ref_source

an OAuth2ServiceRefSourceFunc function to obtain an Source

out_access_token

return location for the access token

out_expires_in

how many seconds the access token expires in

cancellable

optional Cancellable object, or null

ref_source_user_data

user data for ref_source

Returns:

true, when the returned access token has been set and it's not expired, false otherwise.




2022 vala-language.org