Signon.Identity¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
Set/Get Identity ID |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Emitted when the identity was signed out. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Signon.Identity(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Opaque struct. Use the accessor functions below.
- classmethod new()¶
- Returns:
an instance of an
Signon.Identity.- Return type:
Construct new, empty, identity object.
- classmethod new_from_db(id)¶
- Parameters:
id (
int) – identity ID.- Returns:
an instance of a
Signon.Identity.- Return type:
Construct an identity object associated with an existing identity record.
- create_session(method)¶
- Parameters:
method (
str) – method.- Raises:
- Returns:
a new
Signon.AuthSession.- Return type:
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:
Get the id of the self.
Added in version 2.0.
- get_last_error()¶
- Returns:
a
GLib.Errorcontaining the most recent error, orNoneon failure.- Return type:
Get the most recent error that occurred on self.
- query_info(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.callback (
Gio.AsyncReadyCallbackorNone) – a callback which will be called when theSignon.IdentityInfois available.user_data (
objectorNone) – user data to be passed to the callback.
Fetches the
Signon.IdentityInfoassociated with this identity.Added in version 2.0.
- query_info_finish(res)¶
- Parameters:
res (
Gio.AsyncResult) – AGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toSignon.Identity.query_info().- Raises:
- Returns:
the
Signon.IdentityInfoassociated with this identity.- Return type:
Collect the result of the
Signon.Identity.query_info() operation.
- remove(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.callback (
Gio.AsyncReadyCallbackorNone) – a callback which will be called when the operation has completed.user_data (
objectorNone) – user data to be passed to the callback.
Removes the corresponding credentials record from the database.
Added in version 2.0.
- remove_finish(res)¶
- Parameters:
res (
Gio.AsyncResult)- Raises:
- Return type:
- sign_out(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.callback (
Gio.AsyncReadyCallbackorNone) – a callback which will be called when the operation has completed.user_data (
objectorNone) – user data to be passed to the callback.
Asks signond to close all authentication sessions for this identity, and to remove any stored secrets associated with it (password and authentication tokens).
Added in version 2.0.
- sign_out_finish(res)¶
- Parameters:
res (
Gio.AsyncResult)- Raises:
- Return type:
- store_info(info, cancellable, callback, *user_data)¶
- Parameters:
info (
Signon.IdentityInfo) – theSignon.IdentityInfodata to store.cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.callback (
Gio.AsyncReadyCallbackorNone) – a callback which will be called when the authentication reply is available.user_data (
objectorNone) – user data to be passed to the callback.
Stores the data from info into the identity.
Added in version 2.0.
- store_info_finish(res)¶
- Parameters:
res (
Gio.AsyncResult) – AGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toSignon.Identity.store_info().- Raises:
- Returns:
- Return type:
Collect the result of the
Signon.Identity.store_info() operation.
- verify_secret(secret, cancellable, callback, *user_data)¶
- Parameters:
secret (
str) – the secret (password) to be verified.cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject,Noneto ignore.callback (
Gio.AsyncReadyCallbackorNone) – a callback which will be called when the verification is done.user_data (
objectorNone) – user data to be passed to the callback.
Verifies the given secret.
Added in version 2.0.
- verify_secret_finish(res)¶
- Parameters:
res (
Gio.AsyncResult) – AGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toSignon.Identity.verify_secret().- Raises:
- Returns:
- Return type:
Collect the result of the
Signon.Identity.verify_secret() operation.
Signal Details¶
- Signon.Identity.signals.signed_out(identity)¶
- Signal Name:
signed-out- Flags:
- 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:
- Default Value:
0- Flags:
Set/Get Identity ID