:right-sidebar: True DBusAuthObserver =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.26 .. class:: DBusAuthObserver(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` :Constructors: :: DBusAuthObserver(**properties) new() -> Gio.DBusAuthObserver Constructors ------------ .. rst-class:: interim-class .. class:: DBusAuthObserver :no-index: .. classmethod:: new() -> ~gi.repository.Gio.DBusAuthObserver Creates a new :obj:`~gi.repository.Gio.DBusAuthObserver` object. .. versionadded:: 2.26 Methods ------- .. rst-class:: interim-class .. class:: DBusAuthObserver :no-index: .. method:: allow_mechanism(mechanism: str) -> bool Emits the :obj:`~gi.repository.Gio.DBusAuthObserver`::allow-mechanism signal on ``observer``. .. versionadded:: 2.34 :param mechanism: The name of the mechanism, e.g. ``DBUS_COOKIE_SHA1``. .. method:: authorize_authenticated_peer(stream: ~gi.repository.Gio.IOStream, credentials: ~gi.repository.Gio.Credentials | None = None) -> bool Emits the :obj:`~gi.repository.Gio.DBusAuthObserver`::authorize-authenticated-peer signal on ``observer``. .. versionadded:: 2.26 :param stream: A :obj:`~gi.repository.Gio.IOStream` for the :obj:`~gi.repository.Gio.DBusConnection`. :param credentials: Credentials received from the peer or :const:`None`. Signals ------- .. rst-class:: interim-class .. class:: DBusAuthObserver.signals :no-index: .. method:: allow_mechanism(mechanism: str) -> bool Emitted to check if ``mechanism`` is allowed to be used. .. versionadded:: 2.34 :param mechanism: The name of the mechanism, e.g. ``DBUS_COOKIE_SHA1``. .. method:: authorize_authenticated_peer(stream: ~gi.repository.Gio.IOStream, credentials: ~gi.repository.Gio.Credentials | None = None) -> bool Emitted to check if a peer that is successfully authenticated is authorized. .. versionadded:: 2.26 :param stream: A :obj:`~gi.repository.Gio.IOStream` for the :obj:`~gi.repository.Gio.DBusConnection`. :param credentials: Credentials received from the peer or :const:`None`.