Gio.Credentials
const Gio = imports.gi.Gio; let credentials = new Gio.Credentials();
The Gio.Credentials type is a reference-counted wrapper for native credentials. This information is typically used for identifying, authenticating and authorizing other processes.
Some operating systems supports looking up the credentials of the remote peer of a communication endpoint - see e.g. Gio.Socket.prototype.get_credentials.
Some operating systems supports securely sending and receiving credentials over a Unix Domain Socket, see Gio.UnixCredentialsMessage, Gio.UnixConnection.prototype.send_credentials and Gio.UnixConnection.prototype.receive_credentials for details.
On Linux, the native credential type is a struct ucred - see the unix(7) man page for details. This corresponds to Gio.CredentialsType.linux_ucred.
On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native credential type is a struct cmsgcred. This corresponds to Gio.CredentialsType.freebsd_cmsgcred.
On OpenBSD, the native credential type is a struct sockpeercred. This corresponds to Gio.CredentialsType.openbsd_sockpeercred.
On Solaris (including OpenSolaris and its derivatives), the native credential type is a ucred_t. This corresponds to Gio.CredentialsType.solaris_ucred.
Since 2.26
Hierarchy
-
GObject.Object
- Gio.Credentials