GSignondExtension

GSignondExtension — provides platform adaptation functionality

Functions

const gchar * gsignond_extension_get_name ()
guint32 gsignond_extension_get_version ()
GSignondStorageManager * gsignond_extension_get_storage_manager ()
GSignondSecretStorage * gsignond_extension_get_secret_storage ()
GSignondAccessControlManager * gsignond_extension_get_access_control_manager ()

Types and Values

Includes

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

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://gitlab.com/accounts-sso/gsignond/tree/master/src/extensions

and gSSO configuration is described in GSignondConfig.

Functions

gsignond_extension_get_name ()

const gchar *
gsignond_extension_get_name (GSignondExtension *self);

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

Parameters

self

object instance.

 

Returns

name of the extension.

[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.

Parameters

self

object instance.

 

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.

Parameters

self

object instance.

 

config

configuration object instance.

 

Returns

storage manager object instance.

[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.

Parameters

self

object instance.

 

config

configuration object instance.

 

Returns

secret storage object instance.

[transfer none]


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.

Parameters

self

object instance.

 

config

configuration object instance.

 

Returns

access control manager object instance.

[transfer none]

Types and Values

GSIGNOND_TYPE_EXTENSION

#define GSIGNOND_TYPE_EXTENSION gsignond_extension_get_type ()

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.

Members

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()

 

GSignondExtension

typedef struct _GSignondExtension GSignondExtension;

Opaque GSignondExtension data structure.