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.
-
#is_same_user(other_credentials) ⇒ TrueClass
Checks if credentials and other_credentials is the same user.
-
#new ⇒ Gio::Credentials
Creates a new #GCredentials object with credentials matching the the current process.
-
#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 ⇒ Integer
Tries to get the UNIX process identifier from credentials.
-
#unix_user ⇒ Integer
Tries to get the UNIX user identifier from credentials.
-
#unix_user=(uid) ⇒ TrueClass
Tries to set the UNIX user identifier on credentials.
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. operation there is no #GCredentials support for the OS or if native_type isn’t supported by the OS. Do not free the returned data, it is owned by credentials.
#is_same_user(other_credentials) ⇒ TrueClass
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.
#new ⇒ Gio::Credentials
Creates a new #GCredentials object with credentials matching the the current process.
#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 ⇒ Integer
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 ⇒ Integer
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.
#unix_user=(uid) ⇒ TrueClass
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.