SignonIdentity

SignonIdentity — Client side presentation of a credential.

Synopsis

                    SignonIdentity;
typedef             SignonIdentityFilter;
typedef             SignonIdentityList;
void                (*SignonIdentityInfoCb)             (SignonIdentity *self,
                                                         const SignonIdentityInfo *info,
                                                         const GError *error,
                                                         gpointer user_data);
typedef             SignonIdentityReferenceAddedCb;
typedef             SignonIdentityReferenceRemovedCb;
typedef             SignonIdentityRemovedCb;
typedef             SignonIdentitySignedOutCb;
void                (*SignonIdentityStoreCredentialsCb) (SignonIdentity *self,
                                                         guint32 id,
                                                         const GError *error,
                                                         gpointer user_data);
void                (*SignonIdentityVerifyCb)           (SignonIdentity *self,
                                                         gboolean valid,
                                                         const GError *error,
                                                         gpointer user_data);
void                (*SignonIdentityVoidCb)             (SignonIdentity *self,
                                                         const GError *error,
                                                         gpointer user_data);
void                (*SignonIdentitySessionReadyCb)     (SignonAuthSession *self,
                                                         GError *error,
                                                         GDBusConnection *connection,
                                                         const gchar *bus_name,
                                                         const gchar *object_path);
void                signon_identity_add_reference       (SignonIdentity *self,
                                                         const gchar *reference,
                                                         SignonIdentityReferenceAddedCb cb,
                                                         gpointer user_data);
SignonAuthSession * signon_identity_create_session      (SignonIdentity *self,
                                                         const gchar *method,
                                                         GError **error);
const GError *      signon_identity_get_last_error      (SignonIdentity *identity);
SignonIdentity *    signon_identity_new                 (const gchar *application_context);
SignonIdentity *    signon_identity_new_from_db         (guint32 id,
                                                         const gchar *application_context);
void                signon_identity_query_info          (SignonIdentity *self,
                                                         SignonIdentityInfoCb cb,
                                                         gpointer user_data);
void                signon_identity_remove              (SignonIdentity *self,
                                                         SignonIdentityRemovedCb cb,
                                                         gpointer user_data);
void                signon_identity_remove_reference    (SignonIdentity *self,
                                                         const gchar *reference,
                                                         SignonIdentityReferenceRemovedCb cb,
                                                         gpointer user_data);
void                signon_identity_signout             (SignonIdentity *self,
                                                         SignonIdentitySignedOutCb cb,
                                                         gpointer user_data);
void                signon_identity_store_credentials_with_args
                                                        (SignonIdentity *self,
                                                         const gchar *username,
                                                         const gchar *secret,
                                                         const gboolean store_secret,
                                                         const GHashTable *methods,
                                                         const gchar *caption,
                                                         const gchar * const *realms,
                                                         const SignonSecurityContext *owner,
                                                         const SignonSecurityContextList *access_control_list,
                                                         SignonIdentityType type,
                                                         SignonIdentityStoreCredentialsCb cb,
                                                         gpointer user_data);
void                signon_identity_store_credentials_with_info
                                                        (SignonIdentity *self,
                                                         const SignonIdentityInfo *info,
                                                         SignonIdentityStoreCredentialsCb cb,
                                                         gpointer user_data);
void                signon_identity_verify_secret       (SignonIdentity *self,
                                                         const gchar *secret,
                                                         SignonIdentityVerifyCb cb,
                                                         gpointer user_data);
void                signon_identity_get_auth_session    (SignonIdentity *self,
                                                         SignonAuthSession *session,
                                                         const gchar *method,
                                                         SignonIdentitySessionReadyCb cb);
void                signon_identity_info_access_control_list_append
                                                        (SignonIdentityInfo *info,
                                                         SignonSecurityContext *security_context);
const SignonSecurityContext * signon_identity_info_get_owner
                                                        (const SignonIdentityInfo *info);
void                signon_identity_info_set_methods    (SignonIdentityInfo *info,
                                                         const GHashTable *methods);
void                signon_identity_info_set_owner      (SignonIdentityInfo *info,
                                                         const SignonSecurityContext *owner);
void                signon_identity_info_set_owner_from_values
                                                        (SignonIdentityInfo *info,
                                                         const gchar *system_context,
                                                         const gchar *application_context);

Object Hierarchy

  GObject
   +----SignonIdentity

Properties

  "app-ctx"                  gchar*                : Read / Write
  "id"                       guint                 : Read / Write

Signals

  "signout"                                        : No Hooks

Description

The SignonIdentity represents a database entry for a single identity.

Details

SignonIdentity

typedef struct _SignonIdentity SignonIdentity;

Opaque struct. Use the accessor functions below.


SignonIdentityFilter

typedef GHashTable SignonIdentityFilter;

GHashTable based filter variant dictionary.


SignonIdentityList

typedef GList SignonIdentityList;

GList of SignonIdentity items.


SignonIdentityInfoCb ()

void                (*SignonIdentityInfoCb)             (SignonIdentity *self,
                                                         const SignonIdentityInfo *info,
                                                         const GError *error,
                                                         gpointer user_data);

Callback to be passed to signon_identity_query_info().

self :

the SignonIdentity.

info :

the SignonIdentityInfo for self.

error :

a GError if an error occurred, or NULL otherwise.

user_data :

the user data that was passed when installing this callback.

SignonIdentityReferenceAddedCb

typedef SignonIdentityVoidCb SignonIdentityReferenceAddedCb;

Callback to be passed to signon_identity_add_reference().


SignonIdentityReferenceRemovedCb

typedef SignonIdentityVoidCb SignonIdentityReferenceRemovedCb;

Callback to be passed to signon_identity_remove_reference().


SignonIdentityRemovedCb

typedef SignonIdentityVoidCb SignonIdentityRemovedCb;

Callback to be passed to signon_identity_remove().


SignonIdentitySignedOutCb

typedef SignonIdentityVoidCb SignonIdentitySignedOutCb;

Callback to be passed to signon_identity_signout().


SignonIdentityStoreCredentialsCb ()

void                (*SignonIdentityStoreCredentialsCb) (SignonIdentity *self,
                                                         guint32 id,
                                                         const GError *error,
                                                         gpointer user_data);

Callback to be passed to signon_identity_store_credentials_with_args() or signon_identity_store_credentials_with_info().

self :

the SignonIdentity.

id :

the numeric ID of the identity in the database.

error :

a GError if an error occurred, or NULL otherwise.

user_data :

the user data that was passed when installing this callback.

SignonIdentityVerifyCb ()

void                (*SignonIdentityVerifyCb)           (SignonIdentity *self,
                                                         gboolean valid,
                                                         const GError *error,
                                                         gpointer user_data);

Callback to be passed to signon_identity_verify_secret().

self :

the SignonIdentity.

valid :

whether the secret is valid.

error :

a GError if an error occurred, or NULL otherwise.

user_data :

the user data that was passed when installing this callback.

SignonIdentityVoidCb ()

void                (*SignonIdentityVoidCb)             (SignonIdentity *self,
                                                         const GError *error,
                                                         gpointer user_data);

Generic callback to be passed to several SignonIdentity methods.

self :

the SignonIdentity.

error :

a GError if an error occurred, or NULL otherwise.

user_data :

the user data that was passed when installing this callback.

SignonIdentitySessionReadyCb ()

void                (*SignonIdentitySessionReadyCb)     (SignonAuthSession *self,
                                                         GError *error,
                                                         GDBusConnection *connection,
                                                         const gchar *bus_name,
                                                         const gchar *object_path);

Callback to be passed to signon_identity_get_auth_session().

self :

the SignonAuthSession.

error :

a GError if an error occurred, or NULL otherwise.

connection :

a GDBusConnection for the session.

bus_name :

a D-Bus bus name for the session.

object_path :

a D-Bus object path for the session.

signon_identity_add_reference ()

void                signon_identity_add_reference       (SignonIdentity *self,
                                                         const gchar *reference,
                                                         SignonIdentityReferenceAddedCb cb,
                                                         gpointer user_data);

Adds named reference to identity

self :

the SignonIdentity.

reference :

reference to be added

cb :

callback

user_data :

user_data.

signon_identity_create_session ()

SignonAuthSession * signon_identity_create_session      (SignonIdentity *self,
                                                         const gchar *method,
                                                         GError **error);

Creates an authentication session for this identity.

self :

the SignonIdentity.

method :

method.

error :

pointer to a location which will receive the error, if any.

Returns :

a new SignonAuthSession. [transfer full]

signon_identity_get_last_error ()

const GError *      signon_identity_get_last_error      (SignonIdentity *identity);

Get the most recent error that occurred on identity.

identity :

the SignonIdentity.

Returns :

a GError containing the most recent error, or NULL on failure.

signon_identity_new ()

SignonIdentity *    signon_identity_new                 (const gchar *application_context);

Construct new, empty, identity object.

application_context :

application security context, can be NULL.

Returns :

an instance of an SignonIdentity.

signon_identity_new_from_db ()

SignonIdentity *    signon_identity_new_from_db         (guint32 id,
                                                         const gchar *application_context);

Construct an identity object associated with an existing identity record.

id :

identity ID.

application_context :

application security context, can be NULL.

Returns :

an instance of a SignonIdentity.

signon_identity_query_info ()

void                signon_identity_query_info          (SignonIdentity *self,
                                                         SignonIdentityInfoCb cb,
                                                         gpointer user_data);

Fetches the SignonIdentityInfo data associated with this identity.

self :

the SignonIdentity.

cb :

callback. [scope async]

user_data :

user_data.

signon_identity_remove ()

void                signon_identity_remove              (SignonIdentity *self,
                                                         SignonIdentityRemovedCb cb,
                                                         gpointer user_data);

Removes the corresponding credentials record from the database.

self :

the SignonIdentity.

cb :

callback to be called when the operation has completed. [scope async]

user_data :

user_data to pass to the callback.

signon_identity_remove_reference ()

void                signon_identity_remove_reference    (SignonIdentity *self,
                                                         const gchar *reference,
                                                         SignonIdentityReferenceRemovedCb cb,
                                                         gpointer user_data);

Removes named reference from identity

self :

the SignonIdentity.

reference :

reference to be removed

cb :

callback

user_data :

user_data.

signon_identity_signout ()

void                signon_identity_signout             (SignonIdentity *self,
                                                         SignonIdentitySignedOutCb cb,
                                                         gpointer user_data);

Asks signond to close all authentication sessions for this identity, and to remove any stored secrets associated with it (password and authentication tokens).

self :

the SignonIdentity.

cb :

callback. [scope async]

user_data :

user_data.

signon_identity_store_credentials_with_args ()

void                signon_identity_store_credentials_with_args
                                                        (SignonIdentity *self,
                                                         const gchar *username,
                                                         const gchar *secret,
                                                         const gboolean store_secret,
                                                         const GHashTable *methods,
                                                         const gchar *caption,
                                                         const gchar * const *realms,
                                                         const SignonSecurityContext *owner,
                                                         const SignonSecurityContextList *access_control_list,
                                                         SignonIdentityType type,
                                                         SignonIdentityStoreCredentialsCb cb,
                                                         gpointer user_data);

Stores the given data into the identity.

self :

the SignonIdentity.

username :

username.

secret :

secret.

store_secret :

whether signond should store the password.

methods :

methods. [transfer none][element-type utf8 GStrv]

caption :

caption.

realms :

realms.

owner :

owner.

access_control_list :

access control list.

type :

the type of the identity.

cb :

callback. [scope async]

user_data :

user_data.

signon_identity_store_credentials_with_info ()

void                signon_identity_store_credentials_with_info
                                                        (SignonIdentity *self,
                                                         const SignonIdentityInfo *info,
                                                         SignonIdentityStoreCredentialsCb cb,
                                                         gpointer user_data);

Stores the data from info into the identity.

self :

the SignonIdentity.

info :

the SignonIdentityInfo data to store.

cb :

callback. [scope async]

user_data :

user_data.

signon_identity_verify_secret ()

void                signon_identity_verify_secret       (SignonIdentity *self,
                                                         const gchar *secret,
                                                         SignonIdentityVerifyCb cb,
                                                         gpointer user_data);

Verifies the given secret.

self :

the SignonIdentity.

secret :

the secret (password) to be verified.

cb :

callback. [scope async]

user_data :

user_data.

signon_identity_get_auth_session ()

void                signon_identity_get_auth_session    (SignonIdentity *self,
                                                         SignonAuthSession *session,
                                                         const gchar *method,
                                                         SignonIdentitySessionReadyCb cb);

Obtain a remote object for a local session object.

self :

the SignonIdentity.

session :

the SignonAuthSession object to get the remote object for.

method :

method name for the session.

cb :

completion callback. [scope async]

signon_identity_info_access_control_list_append ()

void                signon_identity_info_access_control_list_append
                                                        (SignonIdentityInfo *info,
                                                         SignonSecurityContext *security_context);

Appends a new SignonSecurityContext item to the access control list.

info :

the SignonIdentityInfo.

security_context :

(transfer full) a security context to be appended.

signon_identity_info_get_owner ()

const SignonSecurityContext * signon_identity_info_get_owner
                                                        (const SignonIdentityInfo *info);

Get owner security context of info.

info :

the SignonIdentityInfo.

Returns :

a security context. [transfer none]

signon_identity_info_set_methods ()

void                signon_identity_info_set_methods    (SignonIdentityInfo *info,
                                                         const GHashTable *methods);

Set allowed methods. Mechanisms are method-specific functions.

info :

the SignonIdentityInfo.

methods :

methods. [transfer none][element-type utf8 GStrv]

signon_identity_info_set_owner ()

void                signon_identity_info_set_owner      (SignonIdentityInfo *info,
                                                         const SignonSecurityContext *owner);

Specify owner security context.

info :

the SignonIdentityInfo.

owner :

(transfer none) a security context of owner.

signon_identity_info_set_owner_from_values ()

void                signon_identity_info_set_owner_from_values
                                                        (SignonIdentityInfo *info,
                                                         const gchar *system_context,
                                                         const gchar *application_context);

Specify owner security context.

info :

the SignonIdentityInfo.

system_context :

owner's system context.

application_context :

owner's application context.

Property Details

The "app-ctx" property

  "app-ctx"                  gchar*                : Read / Write

Set/Get Application Security Context.

Default value: ""


The "id" property

  "id"                       guint                 : Read / Write

Set/Get Identity ID.

Default value: 0

Signal Details

The "signout" signal

void                user_function                      (SignonIdentity *arg0,
                                                        gpointer        user_data)      : No Hooks

Emitted when the identity was signed out.

user_data :

user data set when the signal handler was connected.