trust-store  1.1.0
Provides a common implementation of a trust store to be used by trusted helpers.
core::trust::Request Struct Reference

The Request struct encapsulates information about a trust request answered by the user. More...

#include <request.h>

+ Collaboration diagram for core::trust::Request:

Public Types

enum  Answer : std::int32_t {
  Answer::denied,
  Answer::granted
}
 Enumerates the possible answers given by a user. More...
 
typedef std::chrono::system_clock::duration Duration
 Duration in wallclock time. More...
 
typedef std::chrono::system_clock::time_point Timestamp
 Requests are timestamped with wallclock time. More...
 

Public Attributes

std::string from
 
Feature feature
 
Timestamp when
 
Answer answer
 

Static Public Attributes

static constexpr const unsigned int default_feature = 0
 Default feature identifier. More...
 

Detailed Description

The Request struct encapsulates information about a trust request answered by the user.

A Request is the main entity managed by the trust-store API. Whenever an application tries to access the functionality offered by a trusted helper, the trusted helper checks whether the application has issued a request before. If a query against the trust store returns yes and the user previously granted trust to the application, the application's request to the trusted helpers functionality is granted. If the user previously rejected the request, the app's request is denied. If no previous request can be found, the trusted helper issues a question to the user, collects the answer and transacts the complete request to the store.

Definition at line 54 of file request.h.

Member Typedef Documentation

typedef std::chrono::system_clock::duration core::trust::Request::Duration

Duration in wallclock time.

Definition at line 57 of file request.h.

typedef std::chrono::system_clock::time_point core::trust::Request::Timestamp

Requests are timestamped with wallclock time.

Definition at line 59 of file request.h.

Member Enumeration Documentation

enum core::trust::Request::Answer : std::int32_t
strong

Enumerates the possible answers given by a user.

Enumerator
denied 

Nope, I do not trust this application.

granted 

Yup, I do trust this application.

Definition at line 65 of file request.h.

Member Data Documentation

Answer core::trust::Request::answer

The user's answer.

Definition at line 78 of file request.h.

constexpr const unsigned int core::trust::Request::default_feature = 0
static

Default feature identifier.

Definition at line 62 of file request.h.

Feature core::trust::Request::feature

An application-specific feature identifier.

Definition at line 74 of file request.h.

std::string core::trust::Request::from

The application id of the application that resulted in the request.

Definition at line 72 of file request.h.

Timestamp core::trust::Request::when

When the request happened in wallclock time.

Definition at line 76 of file request.h.


The documentation for this struct was generated from the following file: