GSignondSignonuiData

GSignondSignonuiData — definitions for user interaction parameters

Functions

GSignondSignonuiData * gsignond_signonui_data_new ()
GSignondSignonuiData * gsignond_signonui_data_new_from_variant ()
GSignondSignonuiData * gsignond_signonui_data_copy ()
const gchar * gsignond_signonui_data_get_captcha_response ()
void gsignond_signonui_data_set_captcha_response ()
const gchar * gsignond_signonui_data_get_captcha_url ()
void gsignond_signonui_data_set_captcha_url ()
const gchar * gsignond_signonui_data_get_caption ()
void gsignond_signonui_data_set_caption ()
gboolean gsignond_signonui_data_get_confirm ()
void gsignond_signonui_data_set_confirm ()
const gchar * gsignond_signonui_data_get_final_url ()
void gsignond_signonui_data_set_final_url ()
const gchar * gsignond_signonui_data_get_forgot_password ()
void gsignond_signonui_data_set_forgot_password ()
const gchar * gsignond_signonui_data_get_forgot_password_url ()
void gsignond_signonui_data_set_forgot_password_url ()
const gchar * gsignond_signonui_data_get_message ()
void gsignond_signonui_data_set_message ()
const gchar * gsignond_signonui_data_get_open_url ()
void gsignond_signonui_data_set_open_url ()
const gchar * gsignond_signonui_data_get_password ()
void gsignond_signonui_data_set_password ()
gboolean gsignond_signonui_data_get_query_error ()
void gsignond_signonui_data_set_query_error ()
gboolean gsignond_signonui_data_get_query_password ()
void gsignond_signonui_data_set_query_password ()
gboolean gsignond_signonui_data_get_query_username ()
void gsignond_signonui_data_set_query_username ()
gboolean gsignond_signonui_data_get_remember_password ()
void gsignond_signonui_data_set_remember_password ()
const gchar * gsignond_signonui_data_get_request_id ()
void gsignond_signonui_data_set_request_id ()
const gchar * gsignond_signonui_data_get_test_reply ()
void gsignond_signonui_data_set_test_reply ()
const gchar * gsignond_signonui_data_get_title ()
void gsignond_signonui_data_set_title ()
const gchar * gsignond_signonui_data_get_url_response ()
void gsignond_signonui_data_set_url_response ()
const gchar * gsignond_signonui_data_get_username ()
void gsignond_signonui_data_set_username ()

Types and Values

Includes

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

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.

Functions

gsignond_signonui_data_new ()

GSignondSignonuiData *
gsignond_signonui_data_new (void);

Creates a new instance of GSignondSignonuiData.

Returns

a new GSignondSignonuiData object.


gsignond_signonui_data_new_from_variant ()

GSignondSignonuiData *
gsignond_signonui_data_new_from_variant
                               (GVariant *variant);

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

Parameters

variant

instance of GVariant

 

Returns

a new GSignondSignonuiData object.


gsignond_signonui_data_copy ()

GSignondSignonuiData *
gsignond_signonui_data_copy (GSignondSignonuiData *other);

Creates a copy of the dictionary session data.

Parameters

other

instance of GSignondSignonuiData

 

Returns

a new GSignondSignonuiData object copied from other .

[transfer full]


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.

Parameters

data

a GSignondSignonuiData structure

 

Returns

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

[nullable]


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.

Parameters

data

a GSignondSignonuiData structure

 

response

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

 

gsignond_signonui_data_get_captcha_url ()

const gchar *
gsignond_signonui_data_get_captcha_url
                               (GSignondSignonuiData *data);

A getter for the captcha URL.

Parameters

data

a GSignondSignonuiData structure

 

Returns

the URL to the captcha image to be verified by user.

[nullable]


gsignond_signonui_data_set_captcha_url ()

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

A setter for the captcha URL.

Parameters

data

a GSignondSignonuiData structure

 

url

the URL to the captcha image to be verified by user

 

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.

Parameters

data

a GSignondSignonuiData structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

caption

the caption string

 

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

Parameters

data

a GSignondDictionary structure

 

confirm

the value for the property is written here.

[out]

Returns

whether this property exists in the data dictionary or not.


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

Parameters

data

a GSignondDictionary structure

 

confirm

the value for the property

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

url

the final url

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

forgot

the forgot password string

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

url

the forgot password URL

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

message

the message

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

url

the url to open

 

gsignond_signonui_data_get_password ()

const gchar *
gsignond_signonui_data_get_password (GSignondSignonuiData *data);

A getter for the password string.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


gsignond_signonui_data_set_password ()

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

A setter for the password string.

Parameters

data

a GSignondDictionary structure

 

password

the password string

 

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.

Parameters

data

a GSignondDictionary structure

 

error

the error is written here.

[out]

Returns

whether this property exists in the data dictionary or not.


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.

Parameters

data

a GSignondDictionary structure

 

error

the error

 

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

Parameters

data

a GSignondDictionary structure

 

query_password

the property is written here.

[out]

Returns

whether this property exists in the data dictionary or not.


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

Parameters

data

a GSignondDictionary structure

 

query

the property value

 

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

Parameters

data

a GSignondDictionary structure

 

query_username

the property is written here.

[out]

Returns

whether this property exists in the data dictionary or not.


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

Parameters

data

a GSignondDictionary structure

 

query

the property value

 

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.

Parameters

data

a GSignondDictionary structure

 

remember_password

the property is written here.

[out]

Returns

whether this property exists in the data dictionary or not.


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.

Parameters

data

a GSignondDictionary structure

 

remember

the property value

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

id

request id

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

reply

test reply values

 

gsignond_signonui_data_get_title ()

const gchar *
gsignond_signonui_data_get_title (GSignondSignonuiData *data);

A getter for the UI dialog title.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


gsignond_signonui_data_set_title ()

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

A setter for the UI dialog title.

Parameters

data

a GSignondDictionary structure

 

title

the title

 

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.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


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.

Parameters

data

a GSignondDictionary structure

 

response

the response URL

 

gsignond_signonui_data_get_username ()

const gchar *
gsignond_signonui_data_get_username (GSignondSignonuiData *data);

A getter for the username string.

Parameters

data

a GSignondDictionary structure

 

Returns

.

[nullable]


gsignond_signonui_data_set_username ()

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

A setter for the username string.

Parameters

data

a GSignondDictionary structure

 

username

the username string

 

Types and Values

enum GSignondSignonuiError

This enum defines errors that may happen during user interaction.

Members

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