OAuth2Authorizer
Object Hierarchy:
Description:
[ CCode ( type_id = "gdata_oauth2_authorizer_get_type ()" ) ]
[ Version ( since = "0.17.0" ) ]
public class OAuth2Authorizer : Object, Authorizer
[ 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.
Namespace: GData
Package: libgdata
Content:
Properties:
- public string client_id { get; construct; }
A client ID for your application (see the reference documentation).
- 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:
- public OAuth2Authorizer (string client_id, string client_secret, string redirect_uri, Type service_type)
Creates a new OAuth2Authorizer.
- public OAuth2Authorizer.for_authorization_domains (string client_id, string client_secret, string redirect_uri, List<AuthorizationDomain> authorization_domains)
Creates a new OAuth2Authorizer.
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
Asynchronous version of request_authorization.
- 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)
Sets the authorizer's refresh token, 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
All known members inherited from interface GData.Authorizer