OAuth2Authorizer
Object Hierarchy:
GData.OAuth2Authorizer
GData.OAuth2Authorizer
GData.OAuth2Authorizer
GLib.Object
GLib.Object
GLib.Object->GData.OAuth2Authorizer
GData.Authorizer
GData.Authorizer
GData.Authorizer->GData.OAuth2Authorizer
Description:
[
CCode ( type_id =
"gdata_oauth2_authorizer_get_type ()" ) ]
[
Version ( since =
"0.17.0" ) ]
public class OAuth2Authorizer :
Object ,
Authorizer
All the fields in the OAuth2Authorizer structure are private and should never be accessed directly.
Content:
Properties:
public string client_id { get ; construct ; }
public string client_secret { get ; construct ; }
Client secret provided by Google.
public string locale { get ; set ; }
The locale to use for network requests, in UNIX locale format.
public ProxyResolver proxy_resolver { get ; set ; }
The ProxyResolver used to determine a
proxy URI.
public string redirect_uri { get ; construct ; }
Redirect URI to send the response from the authorisation request to.
public string refresh_token { owned get ; set ; }
The server provided refresh token, which can be stored and passed in
to new OAuth2Authorizer instances before calling
refresh_authorization_async to create a new
short-lived access token.
public uint timeout { get ; set ; }
A timeout, in seconds, for network operations.
Creation methods:
Methods:
public string build_authentication_uri (string ? login_hint, bool include_granted_scopes)
Build an authentication URI to open in the user’s web browser (or an
embedded browser widget).
public string dup_refresh_token ()
Returns the authorizer's refresh token,
refresh_token , as set by client code previously on the
OAuth2Authorizer , or as returned by the most recent authentication operation.
public unowned string get_client_id ()
Returns the authorizer's client ID,
client_id , as specified on constructing the
OAuth2Authorizer .
public unowned string get_client_secret ()
Returns the authorizer's client secret,
client_secret , as specified on constructing the
OAuth2Authorizer .
public unowned string ? get_locale ()
Returns the locale currently being used for network requests, or
null
if the locale is the default.
public unowned ProxyResolver ? get_proxy_resolver ()
Gets the ProxyResolver on the
OAuth2Authorizer 's Session .
public unowned string get_redirect_uri ()
Returns the authorizer’s redirect URI,
redirect_uri , as specified on constructing the
OAuth2Authorizer .
public uint get_timeout ()
Gets the
timeout property; the network timeout, in seconds.
public bool request_authorization (string authorization_code, Cancellable ? cancellable = null ) throws Error
Request an authorisation code from the user’s web browser is
converted to authorisation (access and refresh) tokens.
public async bool request_authorization_async (string authorization_code, Cancellable ? cancellable) throws Error
public void set_locale (string ? locale)
Set the locale used for network requests to locale
, given
in standard UNIX locale format.
public void set_proxy_resolver (ProxyResolver ? proxy_resolver)
Sets the ProxyResolver on the
Session used internally by the given OAuth2Authorizer .
public void set_refresh_token (string ? refresh_token)
public void set_timeout (uint timeout)
Sets the
timeout property; the network timeout, in seconds.
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
All known members inherited from interface GData.Authorizer