Signon.AuthSession¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the state of the |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Signon.AuthSession(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Opaque struct. Use the accessor functions below.
- classmethod new(id, method_name)¶
- Parameters:
id (
int
) – the id of theSignon.Identity
to be used. Can be 0, if this session is not bound to any stored identity.method_name (
str
) – the name of the authentication method to be used.
- Raises:
- Returns:
a new
Signon.AuthSession
.- Return type:
Creates a new
Signon.AuthSession
, which can be used to authenticate using the specified method.
- cancel()¶
Cancel the authentication session.
- get_method()¶
-
Get the current authentication method.
- process(session_data, mechanism, cancellable, callback, *user_data)¶
- Parameters:
session_data (
GLib.Variant
) – a dictionary of parameters.mechanism (
str
) – the authentication mechanism to be used.cancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
object,None
to ignore.callback (
Gio.AsyncReadyCallback
orNone
) – a callback which will be called when the authentication reply is available.user_data (
object
orNone
) – user data to be passed to the callback.
Performs one step of the authentication process. If the
Signon.AuthSession
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.New in version 1.8.
- process_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – AGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toSignon.AuthSession.process
().- Raises:
- Returns:
a
GLib.Variant
of type %G_VARIANT_TYPE_VARDICT containing the authentication reply.- Return type:
Collect the result of the
Signon.AuthSession.process
() operation.New in version 1.8.
Signal Details¶
- Signon.AuthSession.signals.state_changed(auth_session, state, message)¶
- Signal Name:
state-changed
- Flags:
- Parameters:
auth_session (
Signon.AuthSession
) – The object which received the signalstate (
int
) – the current state of theSignon.AuthSession
message (
str
) – the message associated with the state change
Emitted when the state of the
Signon.AuthSession
changes.