![]() |
![]() |
![]() |
libsignon-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#define SIGNON_SESSION_DATA_CAPTION #define SIGNON_SESSION_DATA_PROXY #define SIGNON_SESSION_DATA_REALM #define SIGNON_SESSION_DATA_RENEW_TOKEN #define SIGNON_SESSION_DATA_SECRET #define SIGNON_SESSION_DATA_TIMEOUT #define SIGNON_SESSION_DATA_UI_POLICY #define SIGNON_SESSION_DATA_USERNAME #define SIGNON_SESSION_DATA_WINDOW_ID struct SignonAuthSession; void (*SignonAuthSessionProcessCb) (SignonAuthSession *self
,GHashTable *session_data
,const GError *error
,gpointer user_data
); void (*SignonAuthSessionQueryAvailableMechanismsCb) (SignonAuthSession *self
,gchar **mechanisms
,const GError *error
,gpointer user_data
); enum SignonSessionDataUiPolicy; void signon_auth_session_cancel (SignonAuthSession *self
); const gchar * signon_auth_session_get_method (SignonAuthSession *self
); SignonAuthSession * signon_auth_session_new (gint id
,const gchar *method_name
,GError **err
); void signon_auth_session_process (SignonAuthSession *self
,const GHashTable *session_data
,const gchar *mechanism
,SignonAuthSessionProcessCb cb
,gpointer user_data
); void signon_auth_session_process_async (SignonAuthSession *self
,GVariant *session_data
,const gchar *mechanism
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GVariant * signon_auth_session_process_finish (SignonAuthSession *self
,GAsyncResult *res
,GError **error
); void signon_auth_session_query_available_mechanisms (SignonAuthSession *self
,const gchar **wanted_mechanisms
,SignonAuthSessionQueryAvailableMechanismsCb cb
,gpointer user_data
);
The SignonAuthSession object is responsible for handling the client
authentication. SignonAuthSession objects can be created from existing
identities (via signon_identity_create_session()
or by passing a non-zero ID
to signon_auth_session_new()
), in which case the authentication data such as
username and password will be implicitly taken from the identity, or they
can be created with no existing identity bound to them, in which case all
the authentication data must be filled in by the client when
signon_auth_session_process()
is called.
#define SIGNON_SESSION_DATA_CAPTION "Caption"
Caption for the UI dialog.
#define SIGNON_SESSION_DATA_RENEW_TOKEN "RenewToken"
Requests the signon plugin to obtain a new token (boolean).
#define SIGNON_SESSION_DATA_TIMEOUT "NetworkTimeout"
Network timeout, in milliseconds (uint32).
#define SIGNON_SESSION_DATA_UI_POLICY "UiPolicy"
Policy for the signon process.
|
SignonSessionDataUiPolicy |
#define SIGNON_SESSION_DATA_WINDOW_ID "WindowId"
Platform-specific window id (for dialog transiency) - uint32.
void (*SignonAuthSessionProcessCb) (SignonAuthSession *self
,GHashTable *session_data
,const GError *error
,gpointer user_data
);
SignonAuthSessionProcessCb
is deprecated and should not be used in newly-written code.
This callback is invoked when the authentication plugin delivers the result
of the signon_auth_session_process()
operation.
|
the SignonAuthSession. |
|
a dictionary with the response. [transfer full][element-type utf8 GValue] |
|
a GError if an error occurred, NULL otherwise. |
|
the user data that was passed when installing this callback. |
void (*SignonAuthSessionQueryAvailableMechanismsCb) (SignonAuthSession *self
,gchar **mechanisms
,const GError *error
,gpointer user_data
);
Callback to be passed to signon_auth_session_query_available_mechanisms()
.
|
the SignonAuthSession. |
|
list of available mechanisms. [transfer full][type GStrv] |
|
a GError if an error occurred, NULL otherwise. |
|
the user data that was passed when installing this callback. |
typedef enum { SIGNON_POLICY_DEFAULT = 0, SIGNON_POLICY_REQUEST_PASSWORD, SIGNON_POLICY_NO_USER_INTERACTION, SIGNON_POLICY_VALIDATION, } SignonSessionDataUiPolicy;
Policy for the signon process, passed to the UI plugin.
The plugin can decide when to show UI. | |
Force the user to enter the password. | |
No UI elements will be shown to the user. | |
UI elements can be shown to the user only when CAPTCHA-like security measures are required. |
void signon_auth_session_cancel (SignonAuthSession *self
);
Cancel the authentication session.
|
the SignonAuthSession. |
const gchar * signon_auth_session_get_method (SignonAuthSession *self
);
Get the current authentication method.
|
the SignonAuthSession. |
Returns : |
the authentication method being used, or NULL on failure. |
SignonAuthSession * signon_auth_session_new (gint id
,const gchar *method_name
,GError **err
);
Creates a new SignonAuthSession, which can be used to authenticate using the specified method.
|
the id of the SignonIdentity to be used. Can be 0, if this session is not bound to any stored identity. |
|
the name of the authentication method to be used. |
|
a pointer to a location which will contain the error, in case this function fails. |
Returns : |
a new SignonAuthSession. |
void signon_auth_session_process (SignonAuthSession *self
,const GHashTable *session_data
,const gchar *mechanism
,SignonAuthSessionProcessCb cb
,gpointer user_data
);
signon_auth_session_process
has been deprecated since version 1.8 and should not be used in newly-written code. Use signon_auth_session_process_async()
instead.
Performs one step of the authentication process. If the SignonAuthSession
object is bound to an existing identity, the identity properties such as
username and password will be also passed to the authentication plugin, so
there's no need to fill them into session_data
.
session_data
can be used to add additional authentication parameters to the
session, or to override the parameters otherwise taken from the identity.
|
the SignonAuthSession. |
|
a dictionary of parameters. [transfer none][element-type utf8 GValue] |
|
the authentication mechanism to be used. |
|
a callback which will be called with the result. [scope async] |
|
user data to be passed to the callback. |
void signon_auth_session_process_async (SignonAuthSession *self
,GVariant *session_data
,const gchar *mechanism
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Performs one step of the authentication process. If the SignonAuthSession
object is bound to an existing identity, the identity properties such as
username and password will be also passed to the authentication plugin, so
there's no need to fill them into session_data
.
session_data
can be used to add additional authentication parameters to the
session, or to override the parameters otherwise taken from the identity.
|
the SignonAuthSession. |
|
a dictionary of parameters. [transfer floating] |
|
the authentication mechanism to be used. |
|
optional GCancellable object, NULL to ignore. [allow-none]
|
|
a callback which will be called when the authentication reply is available. [scope async] |
|
user data to be passed to the callback. |
Since 1.8
GVariant * signon_auth_session_process_finish (SignonAuthSession *self
,GAsyncResult *res
,GError **error
);
Collect the result of the signon_auth_session_process_async()
operation.
|
the SignonAuthSession. |
|
A GAsyncResult obtained from the GAsyncReadyCallback passed to
signon_auth_session_process_async() . |
|
return location for error, or NULL . |
Returns : |
a GVariant of type G_VARIANT_TYPE_VARDICT containing the
authentication reply. |
Since 1.8
void signon_auth_session_query_available_mechanisms (SignonAuthSession *self
,const gchar **wanted_mechanisms
,SignonAuthSessionQueryAvailableMechanismsCb cb
,gpointer user_data
);
Queries the mechanisms available for this authentication session. the result
will be the intersection between wanted_mechanisms
and the mechanisms
supported by the authentication plugin.
|
the SignonAuthSession. |
|
a NULL -terminated list of mechanisms supported by the client. |
|
a callback which will be called with the result. [scope async] |
|
user data to be passed to the callback. |
"state-changed"
signalvoid user_function (SignonAuthSession *auth_session,
gint state,
gchar *message,
gpointer user_data) : Action
Emitted when the state of the SignonAuthSession changes.
|
the SignonAuthSession |
|
the current state of the SignonAuthSession |
|
the message associated with the state change |
|
user data set when the signal handler was connected. |