GSignondExtension

GSignondExtension — provides platform adaptation functionality

Synopsis

#include <gsignond/gsignond-plugin-interface.h>

struct              GSignondExtension;
struct              GSignondExtensionClass;
GSignondAccessControlManager * gsignond_extension_get_access_control_manager
                                                        (GSignondExtension *self,
                                                         GSignondConfig *config);
const gchar *       gsignond_extension_get_name         (GSignondExtension *self);
GSignondSecretStorage * gsignond_extension_get_secret_storage
                                                        (GSignondExtension *self,
                                                         GSignondConfig *config);
GSignondStorageManager * gsignond_extension_get_storage_manager
                                                        (GSignondExtension *self,
                                                         GSignondConfig *config);
guint32             gsignond_extension_get_version      (GSignondExtension *self);

Object Hierarchy

  GObject
   +----GSignondExtension

Description

GSignondExtension provides access to platform adaptation functionality. It contains getter methods for default implementations of GSignondAccessControlManager, GSignondSecretStorage and GSignondStorageManager.

gSSO can be adapted to a specific platform environment by implementing a custom extension module. The following steps need to be taken:

a) subclass and re-implement some (or all) of the functionality of the above three classes.

b) subclass GSignondExtension and provide implementations of its getter methods for those of the adaptation classes that have been changed.

d) provide a function GSignondExtension * extensionname_extension_init(void) that returns an instance of the GSignondExtension subclass.

c) build and install these implementations as a gSSO extension module and configure gSSO to use it.

Examples of custom extensions can be seen here: https://code.google.com/p/accounts-sso/source/browse/?repo=gsignond#git%2Fsrc%2Fextensions and gSSO configuration is described in GSignondConfig.

Details

struct GSignondExtension

struct GSignondExtension;

Opaque GSignondExtension data structure.


struct GSignondExtensionClass

struct GSignondExtensionClass {
    GObjectClass parent_class;

    const gchar * (*get_extension_name) (GSignondExtension *self);

    guint32 (*get_extension_version) (GSignondExtension *self);

    GSignondStorageManager * (*get_storage_manager) (GSignondExtension *self,
                                                     GSignondConfig *config);

    GSignondSecretStorage * (*get_secret_storage) (GSignondExtension *self,
                                                   GSignondConfig *config);

    GSignondAccessControlManager * (*get_access_control_manager) (
                                                    GSignondExtension *self,
                                                    GSignondConfig *config);
};

GSignondExtensionClass class containing pointers to class methods.

GObjectClass parent_class;

the parent class

get_extension_name ()

implementation of gsignond_extension_get_name()

get_extension_version ()

implementation of gsignond_extension_get_version()

get_storage_manager ()

implementation of gsignond_extension_get_storage_manager()

get_secret_storage ()

implementation of gsignond_extension_get_secret_storage()

get_access_control_manager ()

implementation of gsignond_extension_get_access_control_manager()

gsignond_extension_get_access_control_manager ()

GSignondAccessControlManager * gsignond_extension_get_access_control_manager
                                                        (GSignondExtension *self,
                                                         GSignondConfig *config);

Factory method to get a singleton access control manager object. See GSignondAccessControlManager for the description of the default implementation.

self :

object instance.

config :

configuration object instance.

Returns :

access control manager object instance. [transfer none]

gsignond_extension_get_name ()

const gchar *       gsignond_extension_get_name         (GSignondExtension *self);

Get a human readable name of the extension. Default implementation returns "default".

self :

object instance.

Returns :

name of the extension. [transfer none]

gsignond_extension_get_secret_storage ()

GSignondSecretStorage * gsignond_extension_get_secret_storage
                                                        (GSignondExtension *self,
                                                         GSignondConfig *config);

Factory method to get a singleton secret storage object. See GSignondSecretStorage for the description of the default implementation.

self :

object instance.

config :

configuration object instance.

Returns :

secret storage object instance. [transfer none]

gsignond_extension_get_storage_manager ()

GSignondStorageManager * gsignond_extension_get_storage_manager
                                                        (GSignondExtension *self,
                                                         GSignondConfig *config);

Factory method to get a singleton storage manager object. See GSignondStorageManager for the description of the default implementation.

self :

object instance.

config :

configuration object instance.

Returns :

storage manager object instance. [transfer none]

gsignond_extension_get_version ()

guint32             gsignond_extension_get_version      (GSignondExtension *self);

Get version of the extension, split into four bytes in order from MSB to LSB; major, minor, patchlevel, build. Default implementation returns 0.

self :

object instance.