Class: Gio::Credentials
- Inherits:
-
Object
- Object
- Gio::Credentials
- Defined in:
- (unknown)
Overview
Class structure for #GCredentials.
Instance Method Summary collapse
-
#get_native(native_type) ⇒ GObject
Gets a pointer to native credentials of type native_type from credentials.
-
#initialize ⇒ Gio::Credentials
constructor
Creates a new #GCredentials object with credentials matching the the current process.
-
#is_same_user(other_credentials) ⇒ Boolean
Checks if credentials and other_credentials is the same user.
-
#set_native(native_type, native) ⇒ nil
Copies the native credentials of type native_type from native into credentials.
-
#to_string ⇒ String
Creates a human-readable textual representation of credentials that can be used in logging and debug messages.
-
#unix_pid ⇒ Gio::pid_t
Tries to get the UNIX process identifier from credentials.
-
#unix_user ⇒ Gio::uid_t
Tries to get the UNIX user identifier from credentials.
-
#unix_user=(uid) ⇒ Boolean
Tries to set the UNIX user identifier on credentials.
Constructor Details
#initialize ⇒ Gio::Credentials
Creates a new #GCredentials object with credentials matching the
the current process.
Instance Method Details
#get_native(native_type) ⇒ GObject
Gets a pointer to native credentials of type native_type from
credentials.
It is a programming error (which will cause a warning to be
logged) to use this method if there is no #GCredentials support for
the OS or if native_type isn't supported by the OS.
#is_same_user(other_credentials) ⇒ Boolean
Checks if credentials and other_credentials is the same user.
This operation can fail if #GCredentials is not supported on the
the OS.
user, false otherwise or if error is set.
#set_native(native_type, native) ⇒ nil
Copies the native credentials of type native_type from native
into credentials.
It is a programming error (which will cause a warning to be
logged) to use this method if there is no #GCredentials support for
the OS or if native_type isn't supported by the OS.
#to_string ⇒ String
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.
#unix_pid ⇒ Gio::pid_t
Tries to get the UNIX process identifier from credentials. This
method is only available on UNIX platforms.
This operation can fail if #GCredentials is not supported on the
OS or if the native credentials type does not contain information
about the UNIX process ID.
#unix_user ⇒ Gio::uid_t
Tries to get the UNIX user identifier from credentials. This
method is only available on UNIX platforms.
This operation can fail if #GCredentials is not supported on the
OS or if the native credentials type does not contain information
about the UNIX user.
As the signedness of uid_t is not specified by POSIX, it is recommended to
check error for failure rather than trying to check the return value,
particularly in language bindings.
#unix_user=(uid) ⇒ Boolean
Tries to set the UNIX user identifier on credentials. This method
is only available on UNIX platforms.
This operation can fail if #GCredentials is not supported on the
OS or if the native credentials type does not contain information
about the UNIX user. It can also fail if the OS does not allow the
use of "spoofed" credentials.