ApOAuthPlugin

ApOAuthPlugin — Base class for account plugins using OAuth authentication.

Functions

Properties

GHashTable * oauth-params Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── ApPlugin
        ╰── ApOAuthPlugin

Includes

#include <libaccount-plugin/oauth-plugin.h>

Description

This class helps creating account plugins which use the OAuth authentication method.

Functions

ap_oauth_plugin_set_mechanism ()

void
ap_oauth_plugin_set_mechanism (ApOAuthPlugin *self,
                               ApOAuthMechanism mechanism);

Set the OAuth mechanism to be used when authenticating the account.

Parameters

self

the ApOAuthPlugin.

 

mechanism

the desired OAuth mechanism.

 

ap_oauth_plugin_set_oauth_parameters ()

void
ap_oauth_plugin_set_oauth_parameters (ApOAuthPlugin *self,
                                      GHashTable *oauth_params);

Sets the dictionary of OAuth parameters to be used when authenticating the account. Note that these parameters are not stored in the account and will be used only by the account plugin. To set the authentication parameters used by applications, use ap_oauth_plugin_set_account_oauth_parameters().

Parameters

self

the ApOAuthPlugin.

 

oauth_params

a dictionary of OAuth parameters.

[element-type utf8 GValue]

ap_oauth_plugin_set_account_oauth_parameters ()

void
ap_oauth_plugin_set_account_oauth_parameters
                               (ApOAuthPlugin *self,
                                GHashTable *oauth_params);

Sets the dictionary of OAuth parameters to be used by client applications when authenticating the account. These are the parameters which will be stored into the account configuration (those used by the plugin itself when authenticating are those set with ap_oauth_plugin_set_oauth_parameters()).

Parameters

self

the ApOAuthPlugin.

 

oauth_params

a dictionary of OAuth parameters.

[element-type utf8 GValue]

Types and Values

struct ApOAuthPlugin

struct ApOAuthPlugin;

Use the accessor functions below.


enum ApOAuthMechanism

The authentication mechanism to be used.

Members

AP_OAUTH_MECHANISM_USER_AGENT

OAuth 2.0, user-agent flow (default)

 

AP_OAUTH_MECHANISM_WEB_SERVER

OAuth 2.0, web-server flow

 

AP_OAUTH_MECHANISM_HMAC_SHA1

OAuth 1.0a, signing type: HMAC-SHA1

 

AP_OAUTH_MECHANISM_PLAINTEXT

OAuth 1.0a, signing type: PLAINTEXT

 

AP_OAUTH_MECHANISM_RSA_SHA1

OAuth 1.0a, signing type: RSA-SHA1

 

Property Details

The “oauth-params” property

  “oauth-params”             GHashTable *

A dictionary of OAuth parameters, to be used when authenticating an account.

Flags: Read / Write / Construct Only