GSignondSessionData

GSignondSessionData — definitions for authentication session parameters

Functions

Types and Values

Includes

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

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.

Functions

gsignond_session_data_new ()

GSignondSessionData *
gsignond_session_data_new (void);

Creates a new instance of GSignondSessionData.

Returns

GSignondSessionData object if successful, NULL otherwise.

[transfer full]


gsignond_session_data_new_from_variant ()

GSignondSessionData *
gsignond_session_data_new_from_variant
                               (GVariant *variant);

Converts the GVariant to GSignondSessionData. This is useful for example if the dictionary needs to be deserialized, or if it's contained in another GSignondSessionData and has been retrieved using gsignond_dictionary_get().

Parameters

variant

instance of GVariant

 

Returns

GSignondSessionData if successful, NULL otherwise.

[transfer full]


gsignond_session_data_copy ()

GSignondSessionData *
gsignond_session_data_copy (GSignondSessionData *other);

Creates a copy of the dictionary session data.

Parameters

other

instance of GSignondSessionData

 

Returns

GSignondSessionData object if the copy was successful, NULL otherwise.

[transfer full]


gsignond_session_data_get_username ()

const gchar *
gsignond_session_data_get_username (GSignondSessionData *data);

A getter for a username associated with the authentication session.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[transfer none]


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.

Parameters

data

a GSignondDictionary structure

 

username

username to set

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[transfer none]


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.

Parameters

data

a GSignondDictionary structure

 

secret

a secret to set

 

gsignond_session_data_get_realm ()

const gchar *
gsignond_session_data_get_realm (GSignondSessionData *data);

A getter for a realm associated with the authentication session.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[transfer none]


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.

Parameters

data

a GSignondDictionary structure

 

realm

a realm to set

 

gsignond_session_data_get_allowed_realms ()

GSequence *
gsignond_session_data_get_allowed_realms
                               (GSignondSessionData *data);

A getter for a list of realms allowed for the identity use.

[skip]

Parameters

data

a GSignondDictionary structure

 

Returns

GSequence of allowed realms.

[transfer full]


gsignond_session_data_set_allowed_realms ()

void
gsignond_session_data_set_allowed_realms
                               (GSignondSessionData *data,
                                GSequence *realms);

A setter for a list of realms allowed for the identity use.

Parameters

data

a GSignondDictionary structure

 

realms

a GSequence if allowed realms

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[transfer none]


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.

Parameters

data

a GSignondDictionary structure

 

caption

a caption to set

 

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.

Parameters

data

a GSignondDictionary structure

 

renew_token

the value for the parameter is written here.

[out]

Returns

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


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.

Parameters

data

a GSignondDictionary structure

 

renew_token

whether to renew the token set

 

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.

Parameters

data

a GSignondDictionary structure

 

ui_policy

the value for the parameter is written here.

[out]

Returns

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


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.

Parameters

data

a GSignondDictionary structure

 

ui_policy

ui policy to set

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[transfer none]


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.

Parameters

data

a GSignondDictionary structure

 

network_proxy

network proxy to use

 

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.

Parameters

data

a GSignondDictionary structure

 

network_timeout

the value for the parameter is written here.

[out]

Returns

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


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.

Parameters

data

a GSignondDictionary structure

 

network_timeout

network timeout to use

 

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.

Parameters

data

a GSignondDictionary structure

 

window_id

the value for the parameter is written here.

[out]

Returns

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


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.

Parameters

data

a GSignondDictionary structure

 

window_id

window id to use

 

Types and Values

enum GSignondUiPolicy

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

Members

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