Signon.AuthSession

g GObject.Object GObject.Object Signon.AuthSession Signon.AuthSession GObject.Object->Signon.AuthSession

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (id, method_name)

cancel ()

get_method ()

process (session_data, mechanism, cancellable, callback, *user_data)

process_finish (res)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

state-changed

Emitted when the state of the Signon.AuthSession changes.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Signon.AuthSession(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Signon.AuthSessionClass

Opaque struct. Use the accessor functions below.

classmethod new(id, method_name)
Parameters:
  • id (int) – the id of the Signon.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:

GLib.Error

Returns:

a new Signon.AuthSession.

Return type:

Signon.AuthSession

Creates a new Signon.AuthSession, which can be used to authenticate using the specified method.

cancel()

Cancel the authentication session.

get_method()
Returns:

the authentication method being used, or None on failure.

Return type:

str

Get the current authentication method.

process(session_data, mechanism, cancellable, callback, *user_data)
Parameters:

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) – A Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Signon.AuthSession.process().

Raises:

GLib.Error

Returns:

a GLib.Variant of type %G_VARIANT_TYPE_VARDICT containing the authentication reply.

Return type:

GLib.Variant

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:

RUN_LAST, ACTION

Parameters:

Emitted when the state of the Signon.AuthSession changes.