Signon.Identity

g GObject.Object GObject.Object Signon.Identity Signon.Identity GObject.Object->Signon.Identity

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_from_db (id)

create_session (method)

get_id ()

get_last_error ()

query_info (cancellable, callback, *user_data)

query_info_finish (res)

remove (cancellable, callback, *user_data)

remove_finish (res)

sign_out (cancellable, callback, *user_data)

sign_out_finish (res)

store_info (info, cancellable, callback, *user_data)

store_info_finish (res)

verify_secret (secret, cancellable, callback, *user_data)

verify_secret_finish (res)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

id

int

r/w/co

Set/Get Identity ID

Signals

Inherited:

GObject.Object (1)

Name

Short Description

signed-out

Emitted when the identity was signed out.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Signon.Identity(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Signon.IdentityClass

Opaque struct. Use the accessor functions below.

classmethod new()
Returns:

an instance of an Signon.Identity.

Return type:

Signon.Identity

Construct new, empty, identity object.

classmethod new_from_db(id)
Parameters:

id (int) – identity ID.

Returns:

an instance of a Signon.Identity.

Return type:

Signon.Identity

Construct an identity object associated with an existing identity record.

create_session(method)
Parameters:

method (str) – method.

Raises:

GLib.Error

Returns:

a new Signon.AuthSession.

Return type:

Signon.AuthSession

Creates an authentication session for this identity.

get_id()
Returns:

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

Return type:

int

Get the id of the self.

New in version 2.0.

get_last_error()
Returns:

a GLib.Error containing the most recent error, or None on failure.

Return type:

GLib.Error

Get the most recent error that occurred on self.

query_info(cancellable, callback, *user_data)
Parameters:

Fetches the Signon.IdentityInfo associated with this identity.

New in version 2.0.

query_info_finish(res)
Parameters:

res (Gio.AsyncResult) – A Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Signon.Identity.query_info().

Raises:

GLib.Error

Returns:

the Signon.IdentityInfo associated with this identity.

Return type:

Signon.IdentityInfo

Collect the result of the Signon.Identity.query_info() operation.

remove(cancellable, callback, *user_data)
Parameters:

Removes the corresponding credentials record from the database.

New in version 2.0.

remove_finish(res)
Parameters:

res (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

sign_out(cancellable, callback, *user_data)
Parameters:

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

New in version 2.0.

sign_out_finish(res)
Parameters:

res (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

store_info(info, cancellable, callback, *user_data)
Parameters:

Stores the data from info into the identity.

New in version 2.0.

store_info_finish(res)
Parameters:

res (Gio.AsyncResult) – A Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Signon.Identity.store_info().

Raises:

GLib.Error

Returns:

True if the info has been stored, False otherwise.

Return type:

bool

Collect the result of the Signon.Identity.store_info() operation.

verify_secret(secret, cancellable, callback, *user_data)
Parameters:

Verifies the given secret.

New in version 2.0.

verify_secret_finish(res)
Parameters:

res (Gio.AsyncResult) – A Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Signon.Identity.verify_secret().

Raises:

GLib.Error

Returns:

True if the secret is valid, False otherwise.

Return type:

bool

Collect the result of the Signon.Identity.verify_secret() operation.

Signal Details

Signon.Identity.signals.signed_out(identity)
Signal Name:

signed-out

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

identity (Signon.Identity) – The object which received the signal

Emitted when the identity was signed out.

Property Details

Signon.Identity.props.id
Name:

id

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Set/Get Identity ID