Authority
Object Hierarchy:
Description:
[
CCode ( type_id =
"polkit_authority_get_type ()" ) ]
public class Authority :
Object,
AsyncInitable,
Initable
Authority is used for checking whether a given subject is authorized to perform a given action.
Typically privileged system daemons or suid helpers will use this when handling requests from untrusted clients.
User sessions can register an authentication agent with the authority. This is used for requests from untrusted clients where system
policy requires that the user needs to acknowledge (through proving he is the user or the administrator) a given action. See
PolkitAgentListener and PolkitAgentSession for details.
Content:
Properties:
Static methods:
Creation methods:
Methods:
- public async bool authentication_agent_response (string cookie, Identity identity, Cancellable? cancellable = null) throws Error
Asynchronously provide response that identity
successfully authenticated for the authentication request identified by cookie.
- public bool authentication_agent_response_sync (string cookie, Identity identity, Cancellable? cancellable = null) throws Error
Provide response that identity successfully authenticated
for the authentication request identified by cookie.
- public async AuthorizationResult check_authorization (Subject subject, string action_id, Details? details, CheckAuthorizationFlags flags, Cancellable? cancellable = null) throws Error
Asynchronously checks if subject is authorized to perform
the action represented by action_id.
- public AuthorizationResult check_authorization_sync (Subject subject, string action_id, Details? details, CheckAuthorizationFlags flags, Cancellable? cancellable = null) throws Error
Checks if subject is authorized to perform the action
represented by action_id.
- public async List<ActionDescription> enumerate_actions (Cancellable? cancellable = null) throws Error
Asynchronously retrieves all registered actions.
- public List<ActionDescription> enumerate_actions_sync (Cancellable? cancellable = null) throws Error
Synchronously retrieves all registered actions - the calling thread is
blocked until a reply is received.
- public async List<TemporaryAuthorization> enumerate_temporary_authorizations (Subject subject, Cancellable? cancellable = null) throws Error
Asynchronously gets all temporary authorizations for subject
.
- public List<TemporaryAuthorization> enumerate_temporary_authorizations_sync (Subject subject, Cancellable? cancellable = null) throws Error
Synchronousky gets all temporary authorizations for subject
.
- public AuthorityFeatures get_backend_features ()
Gets the features supported by the authority backend.
- public unowned string get_backend_name ()
Gets the name of the authority backend.
- public unowned string get_backend_version ()
Gets the version of the authority backend.
- public string? get_owner ()
The unique name on the system message bus of the owner of the name
<literal>org.
- public async bool register_authentication_agent (Subject subject, string locale, string object_path, Cancellable? cancellable = null) throws Error
Asynchronously registers an authentication agent.
- public bool register_authentication_agent_sync (Subject subject, string locale, string object_path, Cancellable? cancellable = null) throws Error
Registers an authentication agent.
- public async bool register_authentication_agent_with_options (Subject subject, string locale, string object_path, Variant? options, Cancellable? cancellable = null) throws Error
Asynchronously registers an authentication agent.
- public bool register_authentication_agent_with_options_sync (Subject subject, string locale, string object_path, Variant? options, Cancellable? cancellable = null) throws Error
Registers an authentication agent.
- public async bool revoke_temporary_authorization_by_id (string id, Cancellable? cancellable = null) throws Error
Asynchronously revoke a temporary authorization.
- public bool revoke_temporary_authorization_by_id_sync (string id, Cancellable? cancellable = null) throws Error
Synchronously revokes a temporary authorization.
- public async bool revoke_temporary_authorizations (Subject subject, Cancellable? cancellable = null) throws Error
Asynchronously revokes all temporary authorizations for subject
.
- public bool revoke_temporary_authorizations_sync (Subject subject, Cancellable? cancellable = null) throws Error
Synchronously revokes all temporary authorization from subject
.
- public async bool unregister_authentication_agent (Subject subject, string object_path, Cancellable? cancellable = null) throws Error
Asynchronously unregisters an authentication agent.
- public bool unregister_authentication_agent_sync (Subject subject, string object_path, Cancellable? cancellable = null) throws Error
Unregisters an authentication agent.
Signals:
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface GLib.AsyncInitable
All known members inherited from interface GLib.Initable