A Configuration object implementation that reads values from JSON file.
More...
#include <Configuration.h>
Inherits libcdoc::Configuration.
|
static constexpr char const * | KEYSERVER_SEND_URL = "KEYSERVER_SEND_URL" |
| Send URL of keyserver (Domain is server id)
|
|
static constexpr char const * | KEYSERVER_FETCH_URL = "KEYSERVER_FETCH_URL" |
| Fetch URL of keyserver (Domain is server id)
|
|
static constexpr char const * | SHARE_SERVER_URLS = "SHARE_SERVER_URLS" |
| JSON array of share server base urls (Domain is server id)
|
|
static constexpr char const * | SHARE_SIGNER = "SHARE_SIGNER" |
| Method for signing keyshare tickets (SMART_ID or MOBILE_ID)
|
|
static constexpr char const * | SID_DOMAIN = "SMART_ID" |
| Domain of SmartID settings.
|
|
static constexpr char const * | MID_DOMAIN = "MOBILE_ID" |
| Domain of Mobile ID settings.
|
|
static constexpr char const * | BASE_URL = "BASE_URL" |
| MID/SID base url (domain is SMART_ID or MOBILE_ID)
|
|
static constexpr char const * | RP_UUID = "RP_UUID" |
| MID/SID relying party UUID (domain is SMART_ID or MOBILE_ID)
|
|
static constexpr char const * | RP_NAME = "RP_NAME" |
| MID/SID relying party name (domain is SMART_ID or MOBILE_ID)
|
|
static constexpr char const * | PHONE_NUMBER = "PHONE_NUMBER" |
| Mobile ID phone number (domain is MOBILE_ID)
|
|
A Configuration object implementation that reads values from JSON file.
The file should represent a single object with key/value pairs Domain should contain sub-objects with corresponding key/value pairs Strings are returned unquoted, everything else is returned as JSON
◆ JSONConfiguration() [1/4]
libcdoc::JSONConfiguration::JSONConfiguration |
( |
| ) |
|
◆ JSONConfiguration() [2/4]
libcdoc::JSONConfiguration::JSONConfiguration |
( |
std::istream & |
ifs | ) |
|
◆ JSONConfiguration() [3/4]
libcdoc::JSONConfiguration::JSONConfiguration |
( |
const std::string & |
file | ) |
|
◆ JSONConfiguration() [4/4]
libcdoc::JSONConfiguration::JSONConfiguration |
( |
const std::vector< uint8_t > & |
data | ) |
|
◆ ~JSONConfiguration()
libcdoc::JSONConfiguration::~JSONConfiguration |
( |
| ) |
|
◆ getValue()
std::string libcdoc::JSONConfiguration::getValue |
( |
std::string_view |
domain, |
|
|
std::string_view |
param |
|
) |
| const |
|
overridevirtual |
get a value of configuration parameter
Get a string value of configuration parameter.
- Parameters
-
domain | the parameter domain. For keyservers this is the server ID. |
param | the parameter name. |
- Returns
- a string value or empty string if parameter is not defined.
Reimplemented from libcdoc::Configuration.
◆ parse() [1/3]
bool libcdoc::JSONConfiguration::parse |
( |
const std::string & |
file | ) |
|
Read configuration data from file.
Existing values are replaced
- Parameters
-
- Returns
- true if successful
◆ parse() [2/3]
bool libcdoc::JSONConfiguration::parse |
( |
const std::vector< uint8_t > & |
data | ) |
|
Read configuration data from byte vector.
Existing values are replaced
- Parameters
-
- Returns
- true if successful
◆ parse() [3/3]
bool libcdoc::JSONConfiguration::parse |
( |
std::istream & |
ifs | ) |
|
Read configuration data from input stream.
Existing values are replaced
- Parameters
-
- Returns
- true if successful
The documentation for this struct was generated from the following file: