GSignondSessionData

GSignondSessionData — definitions for authentication session parameters

Synopsis

#include <gsignond/gsignond-session-data.h>

typedef             GSignondSessionData;
enum                GSignondUiPolicy;
const gchar *       gsignond_session_data_get_caption   (GSignondSessionData *data);
const gchar *       gsignond_session_data_get_network_proxy
                                                        (GSignondSessionData *data);
gboolean            gsignond_session_data_get_network_timeout
                                                        (GSignondSessionData *data,
                                                         guint32 *network_timeout);
const gchar *       gsignond_session_data_get_realm     (GSignondSessionData *data);
gboolean            gsignond_session_data_get_renew_token
                                                        (GSignondSessionData *data,
                                                         gboolean *renew_token);
const gchar *       gsignond_session_data_get_secret    (GSignondSessionData *data);
gboolean            gsignond_session_data_get_ui_policy (GSignondSessionData *data,
                                                         GSignondUiPolicy *ui_policy);
const gchar *       gsignond_session_data_get_username  (GSignondSessionData *data);
gboolean            gsignond_session_data_get_window_id (GSignondSessionData *data,
                                                         guint32 *window_id);
void                gsignond_session_data_set_caption   (GSignondSessionData *data,
                                                         const gchar *caption);
void                gsignond_session_data_set_network_proxy
                                                        (GSignondSessionData *data,
                                                         const gchar *network_proxy);
void                gsignond_session_data_set_network_timeout
                                                        (GSignondSessionData *data,
                                                         guint32 network_timeout);
void                gsignond_session_data_set_realm     (GSignondSessionData *data,
                                                         const gchar *realm);
void                gsignond_session_data_set_renew_token
                                                        (GSignondSessionData *data,
                                                         gboolean renew_token);
void                gsignond_session_data_set_secret    (GSignondSessionData *data,
                                                         const gchar *secret);
void                gsignond_session_data_set_ui_policy (GSignondSessionData *data,
                                                         GSignondUiPolicy ui_policy);
void                gsignond_session_data_set_username  (GSignondSessionData *data,
                                                         const gchar *username);
void                gsignond_session_data_set_window_id (GSignondSessionData *data,
                                                         guint32 window_id);

Description

This file provides commonly used parameters for authentication sessions. For each of those a getter and setter is defined, on GSignondSessionData container. The plugins may not use all of these parameters, and they commonly require additional, custom parameters which are set using GSignondDictionary setters with explicit key string.

Details

GSignondSessionData

typedef GSignondDictionary GSignondSessionData;

GSignondSessionData is simply a typedef for GSignondDictionary, which means the developers may also freely use methods associated with that structure, in particular for creating a GSignondSessionData object with gsignond_dictionary_new().


enum GSignondUiPolicy

typedef enum {
    GSIGNOND_UI_POLICY_DEFAULT = 0,
    GSIGNOND_UI_POLICY_REQUEST_PASSWORD,
    GSIGNOND_UI_POLICY_NO_USER_INTERACTION,
    GSIGNOND_UI_POLICY_VALIDATION
} GSignondUiPolicy;

Policy setting to define how plugins should handle interaction with the user.

GSIGNOND_UI_POLICY_DEFAULT

use a default user interaction scenario

GSIGNOND_UI_POLICY_REQUEST_PASSWORD

force an authorization request from the user; any cached access tokens should be discarded by the plugin.

GSIGNOND_UI_POLICY_NO_USER_INTERACTION

force no interaction with the user

GSIGNOND_UI_POLICY_VALIDATION

interaction with the user is only allowed for validation captchas and similar security measures

gsignond_session_data_get_caption ()

const gchar *       gsignond_session_data_get_caption   (GSignondSessionData *data);

A getter for a caption associated with the authentication session. Caption tells the user which application/credentials/provider is requestion authentication.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_session_data_get_network_proxy ()

const gchar *       gsignond_session_data_get_network_proxy
                                                        (GSignondSessionData *data);

A getter for a network proxy setting associated with the authentication session. If this property is not set, the default system proxy settings should be used.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_session_data_get_network_timeout ()

gboolean            gsignond_session_data_get_network_timeout
                                                        (GSignondSessionData *data,
                                                         guint32 *network_timeout);

A getter for a network timeout setting associated with the authentication session. This can be used to change the default timeout in case of unresponsive servers.

data :

a GSignondDictionary structure

network_timeout :

the value for the parameter is written here

Returns :

whether the key-value pair exists in the data dictionary or not.

gsignond_session_data_get_realm ()

const gchar *       gsignond_session_data_get_realm     (GSignondSessionData *data);

A getter for a realm associated with the authentication session.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_session_data_get_renew_token ()

gboolean            gsignond_session_data_get_renew_token
                                                        (GSignondSessionData *data,
                                                         gboolean *renew_token);

A getter for a renew token property associated with the authentication session. This property tells the plugin to discard any cached tokens and start the authentication process anew.

data :

a GSignondDictionary structure

renew_token :

the value for the parameter is written here

Returns :

whether the key-value pair exists in the data dictionary or not.

gsignond_session_data_get_secret ()

const gchar *       gsignond_session_data_get_secret    (GSignondSessionData *data);

A getter for a secret (e.g. a password) associated with the authentication session.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_session_data_get_ui_policy ()

gboolean            gsignond_session_data_get_ui_policy (GSignondSessionData *data,
                                                         GSignondUiPolicy *ui_policy);

A getter for UI policy setting associated with the authentication session. The UI policy indicates how the authentication plugin should interact with the user.

data :

a GSignondDictionary structure

ui_policy :

the value for the parameter is written here

Returns :

whether the key-value pair exists in the data dictionary or not.

gsignond_session_data_get_username ()

const gchar *       gsignond_session_data_get_username  (GSignondSessionData *data);

A getter for a username associated with the authentication session.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_session_data_get_window_id ()

gboolean            gsignond_session_data_get_window_id (GSignondSessionData *data,
                                                         guint32 *window_id);

A getter for a window id setting associated with the authentication session. This can be used to embed the user interaction window produced by the authentication session into an application window.

data :

a GSignondDictionary structure

window_id :

the value for the parameter is written here

Returns :

whether the key-value pair exists in the data dictionary or not.

gsignond_session_data_set_caption ()

void                gsignond_session_data_set_caption   (GSignondSessionData *data,
                                                         const gchar *caption);

A setter for a caption associated with the authentication session. Caption tells the user which application/credentials/provider is requestion authentication.

data :

a GSignondDictionary structure

caption :

a caption to set

gsignond_session_data_set_network_proxy ()

void                gsignond_session_data_set_network_proxy
                                                        (GSignondSessionData *data,
                                                         const gchar *network_proxy);

A setter for a network proxy setting associated with the authentication session. If this property is not set, the default system proxy settings should be used.

data :

a GSignondDictionary structure

network_proxy :

network proxy to use

gsignond_session_data_set_network_timeout ()

void                gsignond_session_data_set_network_timeout
                                                        (GSignondSessionData *data,
                                                         guint32 network_timeout);

A setter for a network timeout setting associated with the authentication session. This can be used to change the default timeout in case of unresponsive servers.

data :

a GSignondDictionary structure

network_timeout :

network timeout to use

gsignond_session_data_set_realm ()

void                gsignond_session_data_set_realm     (GSignondSessionData *data,
                                                         const gchar *realm);

A setter for a realm associated with the authentication session.

data :

a GSignondDictionary structure

realm :

a realm to set

gsignond_session_data_set_renew_token ()

void                gsignond_session_data_set_renew_token
                                                        (GSignondSessionData *data,
                                                         gboolean renew_token);

A setter for a renew token property associated with the authentication session. This property tells the plugin to discard any cached tokens and start the authentication process anew.

data :

a GSignondDictionary structure

renew_token :

whether to renew the token set

gsignond_session_data_set_secret ()

void                gsignond_session_data_set_secret    (GSignondSessionData *data,
                                                         const gchar *secret);

A setter for a secret (e.g. a password) associated with the authentication session.

data :

a GSignondDictionary structure

secret :

a secret to set

gsignond_session_data_set_ui_policy ()

void                gsignond_session_data_set_ui_policy (GSignondSessionData *data,
                                                         GSignondUiPolicy ui_policy);

A getter for UI policy setting associated with the authentication session. The UI policy indicates how the authentication plugin should interact with the user.

data :

a GSignondDictionary structure

ui_policy :

ui policy to set

gsignond_session_data_set_username ()

void                gsignond_session_data_set_username  (GSignondSessionData *data,
                                                         const gchar *username);

A setter for a username associated with the authentication session.

data :

a GSignondDictionary structure

username :

username to set

gsignond_session_data_set_window_id ()

void                gsignond_session_data_set_window_id (GSignondSessionData *data,
                                                         guint32 window_id);

A setter for a window id setting associated with the authentication session. This can be used to embed the user interaction window produced by the authentication session into an application window.

data :

a GSignondDictionary structure

window_id :

window id to use