GSignondSignonuiData

GSignondSignonuiData — definitions for user interaction parameters

Synopsis

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

typedef             GSignondSignonuiData;
enum                GSignondSignonuiError;
const gchar *       gsignond_signonui_data_get_captcha_response
                                                        (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_captcha_url
                                                        (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_caption  (GSignondSignonuiData *data);
gboolean            gsignond_signonui_data_get_confirm  (GSignondSignonuiData *data,
                                                         gboolean *confirm);
const gchar *       gsignond_signonui_data_get_final_url
                                                        (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_forgot_password
                                                        (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_forgot_password_url
                                                        (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_message  (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_open_url (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_password (GSignondSignonuiData *data);
gboolean            gsignond_signonui_data_get_query_error
                                                        (GSignondSignonuiData *data,
                                                         GSignondSignonuiError *error);
gboolean            gsignond_signonui_data_get_query_password
                                                        (GSignondSignonuiData *data,
                                                         gboolean *query_password);
gboolean            gsignond_signonui_data_get_query_username
                                                        (GSignondSignonuiData *data,
                                                         gboolean *query_username);
gboolean            gsignond_signonui_data_get_remember_password
                                                        (GSignondSignonuiData *data,
                                                         gboolean *remember_password);
const gchar *       gsignond_signonui_data_get_request_id
                                                        (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_test_reply
                                                        (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_title    (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_url_response
                                                        (GSignondSignonuiData *data);
const gchar *       gsignond_signonui_data_get_username (GSignondSignonuiData *data);
void                gsignond_signonui_data_set_captcha_response
                                                        (GSignondSignonuiData *data,
                                                         const gchar *response);
void                gsignond_signonui_data_set_captcha_url
                                                        (GSignondSignonuiData *data,
                                                         const gchar *url);
void                gsignond_signonui_data_set_caption  (GSignondSignonuiData *data,
                                                         const gchar *caption);
void                gsignond_signonui_data_set_confirm  (GSignondSignonuiData *data,
                                                         gboolean confirm);
void                gsignond_signonui_data_set_final_url
                                                        (GSignondSignonuiData *data,
                                                         const gchar *url);
void                gsignond_signonui_data_set_forgot_password
                                                        (GSignondSignonuiData *data,
                                                         const gchar *forgot);
void                gsignond_signonui_data_set_forgot_password_url
                                                        (GSignondSignonuiData *data,
                                                         const gchar *url);
void                gsignond_signonui_data_set_message  (GSignondSignonuiData *data,
                                                         const gchar *message);
void                gsignond_signonui_data_set_open_url (GSignondSignonuiData *data,
                                                         const gchar *url);
void                gsignond_signonui_data_set_password (GSignondSignonuiData *data,
                                                         const gchar *password);
void                gsignond_signonui_data_set_query_error
                                                        (GSignondSignonuiData *data,
                                                         GSignondSignonuiError error);
void                gsignond_signonui_data_set_query_password
                                                        (GSignondSignonuiData *data,
                                                         gboolean query);
void                gsignond_signonui_data_set_query_username
                                                        (GSignondSignonuiData *data,
                                                         gboolean query);
void                gsignond_signonui_data_set_remember_password
                                                        (GSignondSignonuiData *data,
                                                         gboolean remember);
void                gsignond_signonui_data_set_request_id
                                                        (GSignondSignonuiData *data,
                                                         const gchar *id);
void                gsignond_signonui_data_set_test_reply
                                                        (GSignondSignonuiData *data,
                                                         const gchar *reply);
void                gsignond_signonui_data_set_title    (GSignondSignonuiData *data,
                                                         const gchar *title);
void                gsignond_signonui_data_set_url_response
                                                        (GSignondSignonuiData *data,
                                                         const gchar *response);
void                gsignond_signonui_data_set_username (GSignondSignonuiData *data,
                                                         const gchar *username);

Description

This file provides commonly used parameters for user interaction during authentication sessions. For each of those a getter and setter is defined, on GSignondSessionData container.

This container is used in two directions: by plugins to specify the parameters for user interaction that is then performed by SignonUI component, and by SignonUI to return the results of that interaction to the plugins. See GSignondPlugin for the user interaction API from the plugins' perspective.

The parameters that are set by the plugin and read by signon UI are captcha url, caption, confirm, final url, forgot password, forgot password url, message, open url, password, query password, query username, remember password, request id, test reply values, title, username.

The parameters that are returned by signon UI to the plugin are captcha response, password, query error code, remember password, url response.

Details

GSignondSignonuiData

typedef GSignondDictionary GSignondSignonuiData;

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


enum GSignondSignonuiError

typedef enum {
    SIGNONUI_ERROR_NONE = 0, 
    SIGNONUI_ERROR_GENERAL,
    SIGNONUI_ERROR_NO_SIGNONUI,
    SIGNONUI_ERROR_BAD_PARAMETERS,
    SIGNONUI_ERROR_CANCELED,
    SIGNONUI_ERROR_NOT_AVAILABLE, 
    SIGNONUI_ERROR_BAD_URL, 
    SIGNONUI_ERROR_BAD_CAPTCHA,
    SIGNONUI_ERROR_BAD_CAPTCHA_URL,
    SIGNONUI_ERROR_REFRESH_FAILED, 
    SIGNONUI_ERROR_FORBIDDEN,
    SIGNONUI_ERROR_FORGOT_PASSWORD
} GSignondSignonuiError;

This enum defines errors that may happen during user interaction.

SIGNONUI_ERROR_NONE

No errors

SIGNONUI_ERROR_GENERAL

Generic error during interaction

SIGNONUI_ERROR_NO_SIGNONUI

Cannot send request to signon-ui

SIGNONUI_ERROR_BAD_PARAMETERS

Signon-Ui cannot create dialog based on the given UiSessionData

SIGNONUI_ERROR_CANCELED

User canceled action. Plugin should not retry automatically after this

SIGNONUI_ERROR_NOT_AVAILABLE

Requested ui is not available. For example browser cannot be started

SIGNONUI_ERROR_BAD_URL

Given url was not valid

SIGNONUI_ERROR_BAD_CAPTCHA

Given captcha image was not valid

SIGNONUI_ERROR_BAD_CAPTCHA_URL

Given url for capctha loading was not valid

SIGNONUI_ERROR_REFRESH_FAILED

Refresh failed

SIGNONUI_ERROR_FORBIDDEN

Showing ui forbidden by ui policy

SIGNONUI_ERROR_FORGOT_PASSWORD

User pressed forgot password

gsignond_signonui_data_get_captcha_response ()

const gchar *       gsignond_signonui_data_get_captcha_response
                                                        (GSignondSignonuiData *data);

A getter for the user's response to a captcha query.

data :

a GSignondDictionary structure

Returns :

the string entered by the user in response to a captcha query. [transfer none]

gsignond_signonui_data_get_captcha_url ()

const gchar *       gsignond_signonui_data_get_captcha_url
                                                        (GSignondSignonuiData *data);

A getter for the captcha URL.

data :

a GSignondDictionary structure

Returns :

the URL to the captcha image to be verified by user. [transfer none]

gsignond_signonui_data_get_caption ()

const gchar *       gsignond_signonui_data_get_caption  (GSignondSignonuiData *data);

A getter for the caption string. Caption tells the user which application/credentials/provider is requestion authentication.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_confirm ()

gboolean            gsignond_signonui_data_get_confirm  (GSignondSignonuiData *data,
                                                         gboolean *confirm);

A getter for the confirm mode. In confirm mode the user is asked to enter an old password (which is compared to the supplied password), and a new password twice (which is returned).

data :

a GSignondDictionary structure

confirm :

the value for the property is written here

Returns :

whether this property exists in the data dictionary or not.

gsignond_signonui_data_get_final_url ()

const gchar *       gsignond_signonui_data_get_final_url
                                                        (GSignondSignonuiData *data);

A getter for the final URL. When the signon UI detects that the user is at the final URL (possibly with additional query or fragment parameters), it will close the window and return the full URL via url response property. This is used by redirection-based authentication, such as OAuth.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_forgot_password ()

const gchar *       gsignond_signonui_data_get_forgot_password
                                                        (GSignondSignonuiData *data);

A getter for the forgot password string which is shown to the user as a link to reset the password or remind him of the password.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_forgot_password_url ()

const gchar *       gsignond_signonui_data_get_forgot_password_url
                                                        (GSignondSignonuiData *data);

A getter for the forgot password URL, where the user can reset or request a reminder of the password.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_message ()

const gchar *       gsignond_signonui_data_get_message  (GSignondSignonuiData *data);

A getter for the message which is show to the user in the signon UI dialog.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_open_url ()

const gchar *       gsignond_signonui_data_get_open_url (GSignondSignonuiData *data);

A getter for the URL that should be opened by signon UI.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_password ()

const gchar *       gsignond_signonui_data_get_password (GSignondSignonuiData *data);

A getter for the password string.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_query_error ()

gboolean            gsignond_signonui_data_get_query_error
                                                        (GSignondSignonuiData *data,
                                                         GSignondSignonuiError *error);

A getter for the UI interaction error. Signon UI sets this to SIGNONUI_ERROR_NONE if there were no errors.

data :

a GSignondDictionary structure

error :

the error is written here

Returns :

whether this property exists in the data dictionary or not.

gsignond_signonui_data_get_query_password ()

gboolean            gsignond_signonui_data_get_query_password
                                                        (GSignondSignonuiData *data,
                                                         gboolean *query_password);

A getter for the query password property. It indicates whether the signon UI should ask the user for a password (and return it in the password property).

data :

a GSignondDictionary structure

query_password :

the property is written here

Returns :

whether this property exists in the data dictionary or not.

gsignond_signonui_data_get_query_username ()

gboolean            gsignond_signonui_data_get_query_username
                                                        (GSignondSignonuiData *data,
                                                         gboolean *query_username);

A getter for the query username property. It indicates whether the signon UI should ask the user for a username (and return it in the username property).

data :

a GSignondDictionary structure

query_username :

the property is written here

Returns :

whether this property exists in the data dictionary or not.

gsignond_signonui_data_get_remember_password ()

gboolean            gsignond_signonui_data_get_remember_password
                                                        (GSignondSignonuiData *data,
                                                         gboolean *remember_password);

A getter for whether the password should be remembered.

data :

a GSignondDictionary structure

remember_password :

the property is written here

Returns :

whether this property exists in the data dictionary or not.

gsignond_signonui_data_get_request_id ()

const gchar *       gsignond_signonui_data_get_request_id
                                                        (GSignondSignonuiData *data);

A getter for the dialog request id. The id identifies the dialog so that it can be refreshed or updated.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_test_reply ()

const gchar *       gsignond_signonui_data_get_test_reply
                                                        (GSignondSignonuiData *data);

A getter for the test reply values. It's used only by the signon ui implementations to test themselves.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_title ()

const gchar *       gsignond_signonui_data_get_title    (GSignondSignonuiData *data);

A getter for the UI dialog title.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_url_response ()

const gchar *       gsignond_signonui_data_get_url_response
                                                        (GSignondSignonuiData *data);

A getter for the response URL. If the final URL was set in the request to the signon UI, and the signon UI detects that it has been reached, then the full final URL is returned using this property. This is used by redirection-based authentication such as OAauth.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_get_username ()

const gchar *       gsignond_signonui_data_get_username (GSignondSignonuiData *data);

A getter for the username string.

data :

a GSignondDictionary structure

Returns :

(transfer none)

gsignond_signonui_data_set_captcha_response ()

void                gsignond_signonui_data_set_captcha_response
                                                        (GSignondSignonuiData *data,
                                                         const gchar *response);

A setter for the user's response to a captcha query.

data :

a GSignondDictionary structure

response :

the string entered by the user in response to a captcha query.

gsignond_signonui_data_set_captcha_url ()

void                gsignond_signonui_data_set_captcha_url
                                                        (GSignondSignonuiData *data,
                                                         const gchar *url);

A setter for the captcha URL.

data :

a GSignondDictionary structure

url :

the URL to the captcha image to be verified by user

gsignond_signonui_data_set_caption ()

void                gsignond_signonui_data_set_caption  (GSignondSignonuiData *data,
                                                         const gchar *caption);

A setter for the caption string. Caption tells the user which application/credentials/provider is requestion authentication.

data :

a GSignondDictionary structure

caption :

the caption string

gsignond_signonui_data_set_confirm ()

void                gsignond_signonui_data_set_confirm  (GSignondSignonuiData *data,
                                                         gboolean confirm);

A setter for the confirm mode. In confirm mode the user is asked to enter an old password (which is compared to the supplied password), and a new password twice (which is returned).

data :

a GSignondDictionary structure

confirm :

the value for the property

gsignond_signonui_data_set_final_url ()

void                gsignond_signonui_data_set_final_url
                                                        (GSignondSignonuiData *data,
                                                         const gchar *url);

A setter for the final URL. When the signon UI detects that the user is at the final URL (possibly with additional query or fragment parameters), it will close the window and return the full URL via url response property. This is used by redirection-based authentication, such as OAuth.

data :

a GSignondDictionary structure

url :

the final url

gsignond_signonui_data_set_forgot_password ()

void                gsignond_signonui_data_set_forgot_password
                                                        (GSignondSignonuiData *data,
                                                         const gchar *forgot);

A setter for the forgot password string, which is shown to the user as a link to reset the password or remind him of the password.

data :

a GSignondDictionary structure

forgot :

the forgot password string

gsignond_signonui_data_set_forgot_password_url ()

void                gsignond_signonui_data_set_forgot_password_url
                                                        (GSignondSignonuiData *data,
                                                         const gchar *url);

A setter for the forgot password URL, where the user can reset or request a reminder of the password.

data :

a GSignondDictionary structure

url :

the forgot password URL

gsignond_signonui_data_set_message ()

void                gsignond_signonui_data_set_message  (GSignondSignonuiData *data,
                                                         const gchar *message);

A setter for the message which is show to the user in the signon UI dialog.

data :

a GSignondDictionary structure

message :

the message

gsignond_signonui_data_set_open_url ()

void                gsignond_signonui_data_set_open_url (GSignondSignonuiData *data,
                                                         const gchar *url);

A setter for the URL that should be opened by signon UI.

data :

a GSignondDictionary structure

url :

the url to open

gsignond_signonui_data_set_password ()

void                gsignond_signonui_data_set_password (GSignondSignonuiData *data,
                                                         const gchar *password);

A setter for the password string.

data :

a GSignondDictionary structure

password :

the password string

gsignond_signonui_data_set_query_error ()

void                gsignond_signonui_data_set_query_error
                                                        (GSignondSignonuiData *data,
                                                         GSignondSignonuiError error);

A setter for the UI interaction error. Signon UI sets this to SIGNONUI_ERROR_NONE if there were no errors.

data :

a GSignondDictionary structure

error :

the error

gsignond_signonui_data_set_query_password ()

void                gsignond_signonui_data_set_query_password
                                                        (GSignondSignonuiData *data,
                                                         gboolean query);

A setter for the query password property. It indicates whether the signon UI should ask the user for a password (and return it in the password property).

data :

a GSignondDictionary structure

query :

the property value

gsignond_signonui_data_set_query_username ()

void                gsignond_signonui_data_set_query_username
                                                        (GSignondSignonuiData *data,
                                                         gboolean query);

A setter for the query username property. It indicates whether the signon UI should ask the user for a username (and return it in the username property).

data :

a GSignondDictionary structure

query :

the property value

gsignond_signonui_data_set_remember_password ()

void                gsignond_signonui_data_set_remember_password
                                                        (GSignondSignonuiData *data,
                                                         gboolean remember);

A setter for whether the password should be remembered.

data :

a GSignondDictionary structure

remember :

the property value

gsignond_signonui_data_set_request_id ()

void                gsignond_signonui_data_set_request_id
                                                        (GSignondSignonuiData *data,
                                                         const gchar *id);

A setter for the dialog request id. The id identifies the dialog so that it can be refreshed or updated.

data :

a GSignondDictionary structure

id :

request id

gsignond_signonui_data_set_test_reply ()

void                gsignond_signonui_data_set_test_reply
                                                        (GSignondSignonuiData *data,
                                                         const gchar *reply);

A setter for the test reply values. It's used only by the signon ui implementations to test themselves.

data :

a GSignondDictionary structure

reply :

test reply values

gsignond_signonui_data_set_title ()

void                gsignond_signonui_data_set_title    (GSignondSignonuiData *data,
                                                         const gchar *title);

A setter for the UI dialog title.

data :

a GSignondDictionary structure

title :

the title

gsignond_signonui_data_set_url_response ()

void                gsignond_signonui_data_set_url_response
                                                        (GSignondSignonuiData *data,
                                                         const gchar *response);

A getter for the response URL. If the final URL was set in the request to the signon UI, and the signon UI detects that it has been reached, then the full final URL is returned using this property. This is used by redirection-based authentication such as OAauth.

data :

a GSignondDictionary structure

response :

the response URL

gsignond_signonui_data_set_username ()

void                gsignond_signonui_data_set_username (GSignondSignonuiData *data,
                                                         const gchar *username);

A setter for the username string.

data :

a GSignondDictionary structure

username :

the username string