19#ifndef CORE_TRUST_AGENT_H_
20#define CORE_TRUST_AGENT_H_
38 virtual ~Agent() =
default;
50 typedef std::shared_ptr<Registry>
Ptr;
Abstracts user-prompting functionality.
virtual Request::Answer authenticate_request_with_parameters(const RequestParameters ¶meters)=0
Authenticates the given request and returns the user's answer.
Contains functionality for implementing Ubuntu's trust model.
TaggedInteger< tag::Feature, std::uint64_t > Feature
Our internal service-feature type.
TaggedInteger< tag::Uid, uid_t > Uid
Our internal user id type.
TaggedInteger< tag::Pid, pid_t > Pid
Our internal process id type.
CORE_TRUST_DLL_PUBLIC bool operator==(const Agent::RequestParameters &lhs, const Agent::RequestParameters &rhs)
Returns true iff lhs and rhs are equal.
Abstracts functionality for storing agent instances and associating them with a user id.
virtual void register_agent_for_user(const core::trust::Uid &uid, const std::shared_ptr< core::trust::Agent > &agent)=0
Registers an agent for the given uid.
std::shared_ptr< Registry > Ptr
Convenience typedef for a shared ptr.
virtual void unregister_agent_for_user(const core::trust::Uid &uid)=0
Removes the agent for the given uid from the registry.
Summarizes all parameters for processing a trust request.
core::trust::Pid pid
The process id of the requesting application.
std::string description
An extended description that should be presented to the user on prompting.
std::string id
The id of the requesting application.
core::trust::Uid uid
The user id under which the requesting application runs.
Feature feature
The service-specific feature identifier.
Answer
Enumerates the possible answers given by a user.
#define CORE_TRUST_DLL_PUBLIC