Basics
Guides
API Reference
Basics
Guides
API Reference
[359:14] static extends: object
Generated metadata helpers for DBusAuthObserver class surfaces.
signals ()
Returns signal metadata for
DBusAuthObserver.
A list.[36:7] extends: object
GDBusAuthObserver provides a mechanism for participating in how a
[class@Gio.DBusServer] (or a [class@Gio.DBusConnection]) authenticates remote
peers. Simply instantiate a GDBusAuthObserver and connect to the signals
you are interested in. Note that new signals may be added in the future. ##
Controlling Authentication Mechanisms By default, a GDBusServer or
server-side GDBusConnection will allow any authentication mechanism to be
used. If you only want to allow D-Bus connections with the EXTERNAL
mechanism, which makes use of credentials passing and is the recommended
mechanism for modern Unix platforms such as Linux and the BSD family, you
would use a signal handler like this: c static gboolean on_allow_mechanism (GDBusAuthObserver *observer, const gchar *mechanism, gpointer user_data) { if (g_strcmp0 (mechanism, "EXTERNAL") == 0) { return TRUE; } return FALSE; } ## Controlling Authorization By default, a GDBusServer or server-side
GDBusConnection will accept connections from any successfully authenticated
user (but not from anonymous connections using the ANONYMOUS mechanism). If
you only want to allow D-Bus connections from processes owned by the same uid
as the server, since GLib 2.68, you should use the
G_DBUS_SERVER_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flag. It’s equivalent
to the following signal handler: c static gboolean on_authorize_authenticated_peer (GDBusAuthObserver *observer, GIOStream *stream, GCredentials *credentials, gpointer user_data) { gboolean authorized; authorized = FALSE; if (credentials != NULL) { GCredentials *own_credentials; own_credentials = g_credentials_new (); if (g_credentials_is_same_user (credentials, own_credentials, NULL)) authorized = TRUE; g_object_unref (own_credentials); } return authorized; }
DBusAuthObserver ()
Creates a new #GDBusAuthObserver object.
toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnAllowmechanism (callback Fn, UserData = null)
Emitted to check if @mechanism is allowed to be used.
Fn is the Aussom callback.Fn is called with (DBusAuthObserver Self, string Mechanism).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnAuthorizeauthenticatedpeer (callback Fn, UserData = null)
Emitted to check if a peer that is successfully authenticated is authorized.
Fn is the Aussom callback.Fn is called with (DBusAuthObserver Self, IOStream Stream, Credentials Credentials).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.allow_mechanism (string mechanism)
Emits the #GDBusAuthObserver::allow-mechanism signal on @observer.
mechanism is The name of the mechanism, e.g. DBUS_COOKIE_SHA1..authorize_authenticated_peer (object stream, object credentials)
Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on
stream is A #GIOStream for the #GDBusConnection..credentials is Credentials received from the peer or %NULL..[216:7] extends: object
Generated low-level callback wrapper for GIR callback allow-mechanism.
DBusAuthObserverAllowmechanismCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, mechanism, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[287:7] extends: object
Generated low-level callback wrapper for GIR callback
authorize-authenticated-peer.
DBusAuthObserverAuthorizeauthenticatedpeerCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, stream, credentials, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.