gio.credentials
Module for Credentials class
Types 3
The gio.credentials.Credentials type is a reference-counted wrapper for native credentials.
The information in gio.credentials.Credentials 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.Socket.getCredentials.
Some operating systems supports securely sending and receiving credentials over a Unix Domain Socket, see gio.unix_credentials_message.UnixCredentialsMessage, gio.unix_connection.UnixConnection.sendCredentials and gio.unix_connection.UnixConnection.receiveCredentials for details.
On Linux, the native credential type is a struct ucred - see the unix(7) man page) for details. This corresponds to gio.types.CredentialsType.LinuxUcred.
On Apple operating systems (including iOS, tvOS, and macOS), the native credential type is a struct xucred. This corresponds to gio.types.CredentialsType.AppleXucred.
On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native credential type is a struct cmsgcred. This corresponds to gio.types.CredentialsType.FreebsdCmsgcred.
On NetBSD, the native credential type is a struct unpcbid. This corresponds to gio.types.CredentialsType.NetbsdUnpcbid.
On OpenBSD, the native credential type is a struct sockpeercred. This corresponds to gio.types.CredentialsType.OpenbsdSockpeercred.
On Solaris (including OpenSolaris and its derivatives), the native credential type is a ucred_t. This corresponds to gio.types.CredentialsType.SolarisUcred.
Since GLib 2.72, on Windows, the native credentials may contain the PID of a process. This corresponds to gio.types.CredentialsType.Win32Pid.
Credentials self()Returns `this`, for use in `with` statements.CredentialsGidBuilder builder()Get builder for [gio.credentials.Credentials] Returns: New builder objectint getUnixPid()Tries to get the UNIX process identifier from credentials. This method is only available on UNIX platforms.uint getUnixUser()Tries to get the UNIX user identifier from credentials. This method is only available on UNIX platforms.bool isSameUser(gio.credentials.Credentials otherCredentials)Checks if credentials and other_credentials is the same user.void setNative(gio.types.CredentialsType nativeType, void * native)Copies the native credentials of type native_type from native into credentials.bool setUnixUser(uint uid)Tries to set the UNIX user identifier on credentials. This method is only available on UNIX platforms.string toString_()Creates a human-readable textual representation of credentials that can be used in logging and debug messages. The format of the returned string may change in future GLib release. Returns: A string...Fluent builder implementation template for gio.credentials.Credentials
Fluent builder for gio.credentials.Credentials
Credentials build()Create object from builder. Returns: New object