OAuth2Service
Object Hierarchy:
E.OAuth2Service
E.OAuth2Service
E.OAuth2Service
GLib.Object
GLib.Object
GLib.Object->E.OAuth2Service
Description:
[ CCode ( type_cname = "EOAuth2ServiceInterface" , type_id = "e_oauth2_service_get_type ()" ) ] [ Version ( since = "3.28" ) ]public interface OAuth2Service : Object
Contains only private data that should be read and manipulated using the functions below.
All known implementing classes:
Content:
Static methods:
public static unowned string util_compile_value (string compile_value, out unowned string out_glob_buff, size_t out_glob_buff_size)
Processes the compile_value
and returns the result, which
is stored into the out_glob_buff
.
public static void util_set_to_form (HashTable <string ,string > form, string name, string ? value)
Sets value
for name
to form
.
public static void util_take_to_form (HashTable <string ,string > form, string name, owned string ? value)
Takes ownership of value
and sets it for name
to form
.
Methods:
public abstract bool can_process (Source source)
Checks whether the this can be used
with the given source
.
public bool delete_token_sync (Source source, Cancellable ? cancellable = null ) throws Error
Deletes token information for the this
and source
from the secret store.
public abstract bool extract_authorization_code (Source source, string page_title, string page_uri, string ? page_content, out string out_authorization_code)
Tries to extract an authorization code from a web page provided by the
server.
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.
public abstract OAuth2ServiceNavigationPolicy get_authentication_policy (Source source, string uri)
Used to decide what to do when the server redirects to the next page.
public abstract unowned string get_authentication_uri (Source source)
public abstract unowned string get_client_id (Source source)
public abstract unowned string ? get_client_secret (Source source)
public abstract unowned string get_display_name ()
Returns a human readable name of the service.
public abstract uint32 get_flags ()
public abstract unowned string get_name ()
Returns a unique name of the service.
public abstract unowned string ? get_redirect_uri (Source source)
Returns a value for the "redirect_uri" keys in the authenticate and
get_token operations.
public abstract unowned string get_refresh_uri (Source source)
public abstract bool guess_can_process (string ? protocol, string ? hostname)
Checks whether the this can be used
with the given protocol
and/or hostname
.
public abstract void prepare_authentication_uri_query (Source source, HashTable <string ,string > uri_query)
The this can change what arguments
are passed in the authentication URI in this method.
public abstract void prepare_get_token_form (Source source, string authorization_code, HashTable <string ,string > form)
Sets additional form parameters to be used in the POST request when
requesting access token after successfully obtained authorization code.
public abstract void prepare_get_token_message (Source source, Message message)
public abstract void prepare_refresh_token_form (Source source, string refresh_token, HashTable <string ,string > form)
Sets additional form parameters to be used in the POST request when
requesting to refresh an access token.
public abstract void prepare_refresh_token_message (Source source, Message message)
public bool receive_and_store_token_sync (Source source, string authorization_code, OAuth2ServiceRefSourceFunc ref_source, Cancellable ? cancellable = null ) throws Error
Queries this at
get_refresh_uri with a request to obtain a new access
token, associated with the given authorization_code
and stores it into the secret store on success.
public bool refresh_and_store_token_sync (Source source, string refresh_token, OAuth2ServiceRefSourceFunc ref_source, Cancellable ? cancellable = null ) throws Error
Queries this at
get_refresh_uri with a request to refresh existing access
token with provided refresh_token
and stores it into the secret store on success.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref