SignonIdentity

SignonIdentity — Client side presentation of a credential.

Functions

Properties

guint id Read / Write / Construct Only

Signals

void signed-out No Hooks

Types and Values

Object Hierarchy

    GObject
    ╰── SignonIdentity

Implemented Interfaces

SignonIdentity implements SignonProxy.

Description

The SignonIdentity represents a database entry for a single identity.

Functions

signon_identity_new ()

SignonIdentity *
signon_identity_new ();

Construct new, empty, identity object.

Returns

an instance of an SignonIdentity.


signon_identity_new_from_db ()

SignonIdentity *
signon_identity_new_from_db (guint32 id);

Construct an identity object associated with an existing identity record.

Parameters

id

identity ID.

 

Returns

an instance of a SignonIdentity.


signon_identity_create_session ()

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

Creates an authentication session for this identity.

Parameters

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 .

Parameters

identity

the SignonIdentity.

 

Returns

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


signon_identity_get_id ()

guint32
signon_identity_get_id (SignonIdentity *identity);

Get the id of the identity .

Parameters

identity

the SignonIdentity.

 

Returns

the id of the SignonIdentity, or 0 if the identity has not being registered.

Since: 2.0


signon_identity_query_info ()

void
signon_identity_query_info (SignonIdentity *self,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Fetches the SignonIdentityInfo associated with this identity.

Parameters

self

the SignonIdentity.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a callback which will be called when the SignonIdentityInfo is available.

 

user_data

user data to be passed to the callback.

 

Since: 2.0


signon_identity_query_info_finish ()

SignonIdentityInfo *
signon_identity_query_info_finish (SignonIdentity *self,
                                   GAsyncResult *res,
                                   GError **error);

Collect the result of the signon_identity_query_info() operation.

Parameters

self

the SignonIdentity.

 

res

A GAsyncResult obtained from the GAsyncReadyCallback passed to signon_identity_query_info().

 

error

return location for error, or NULL.

 

Returns

the SignonIdentityInfo associated with this identity.


signon_identity_store_info ()

void
signon_identity_store_info (SignonIdentity *self,
                            const SignonIdentityInfo *info,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Stores the data from info into the identity.

Parameters

self

the SignonIdentity.

 

info

the SignonIdentityInfo data to store.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a callback which will be called when the authentication reply is available.

 

user_data

user data to be passed to the callback.

 

Since: 2.0


signon_identity_store_info_finish ()

gboolean
signon_identity_store_info_finish (SignonIdentity *self,
                                   GAsyncResult *res,
                                   GError **error);

Collect the result of the signon_identity_store_info() operation.

Parameters

self

the SignonIdentity.

 

res

A GAsyncResult obtained from the GAsyncReadyCallback passed to signon_identity_store_info().

 

error

return location for error, or NULL.

 

Returns

TRUE if the info has been stored, FALSE otherwise.


signon_identity_verify_secret ()

void
signon_identity_verify_secret (SignonIdentity *self,
                               const gchar *secret,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Verifies the given secret.

Parameters

self

the SignonIdentity.

 

secret

the secret (password) to be verified.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a callback which will be called when the verification is done.

 

user_data

user data to be passed to the callback.

 

Since: 2.0


signon_identity_verify_secret_finish ()

gboolean
signon_identity_verify_secret_finish (SignonIdentity *self,
                                      GAsyncResult *res,
                                      GError **error);

Collect the result of the signon_identity_verify_secret() operation.

Parameters

self

the SignonIdentity.

 

res

A GAsyncResult obtained from the GAsyncReadyCallback passed to signon_identity_verify_secret().

 

error

return location for error, or NULL.

 

Returns

TRUE if the secret is valid, FALSE otherwise.


signon_identity_sign_out ()

void
signon_identity_sign_out (SignonIdentity *self,
                          GCancellable *cancellable,
                          GAsyncReadyCallback callback,
                          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).

Parameters

self

the SignonIdentity.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a callback which will be called when the operation has completed.

 

user_data

user data to be passed to the callback.

 

Since: 2.0


signon_identity_sign_out_finish ()

gboolean
signon_identity_sign_out_finish (SignonIdentity *self,
                                 GAsyncResult *res,
                                 GError **error);

signon_identity_remove ()

void
signon_identity_remove (SignonIdentity *self,
                        GCancellable *cancellable,
                        GAsyncReadyCallback callback,
                        gpointer user_data);

Removes the corresponding credentials record from the database.

Parameters

self

the SignonIdentity.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a callback which will be called when the operation has completed.

 

user_data

user data to be passed to the callback.

 

Since: 2.0


signon_identity_remove_finish ()

gboolean
signon_identity_remove_finish (SignonIdentity *self,
                               GAsyncResult *res,
                               GError **error);

Types and Values

struct SignonIdentity

struct SignonIdentity;

Opaque struct. Use the accessor functions below.

Property Details

The “id” property

  “id”                       guint

Set/Get Identity ID.

Owner: SignonIdentity

Flags: Read / Write / Construct Only

Default value: 0

Signal Details

The “signed-out” signal

void
user_function (SignonIdentity *signonidentity,
               gpointer        user_data)

Emitted when the identity was signed out.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks