A configuration provider.
More...
#include <Configuration.h>
Inherited by libcdoc::JSONConfiguration.
|
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 provider.
Subclasses can implement different configuration systems (registry, .ini files etc.) by overriding getValue.
◆ Configuration() [1/2]
libcdoc::Configuration::Configuration |
( |
| ) |
|
|
default |
◆ ~Configuration()
virtual libcdoc::Configuration::~Configuration |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ Configuration() [2/2]
◆ CDOC_DISABLE_MOVE()
◆ getBoolean()
bool libcdoc::Configuration::getBoolean |
( |
std::string_view |
param, |
|
|
bool |
def_val = false |
|
) |
| const |
get boolean value of configuration parameter from default domain
- Parameters
-
param | the parameter name |
def_val | the default value to return if parameter is not set |
- Returns
- the parameter value
◆ getInt()
int libcdoc::Configuration::getInt |
( |
std::string_view |
param, |
|
|
int |
def_val = 0 |
|
) |
| const |
get integer value of configuration parameter from default domain
- Parameters
-
param | the parameter name |
def_val | the default value to return if parameter is not set |
- Returns
- the key value
References libcdoc::OK.
◆ getValue() [1/2]
virtual std::string libcdoc::Configuration::getValue |
( |
std::string_view |
domain, |
|
|
std::string_view |
param |
|
) |
| const |
|
inlinevirtual |
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 in libcdoc::JSONConfiguration.
◆ getValue() [2/2]
std::string libcdoc::Configuration::getValue |
( |
std::string_view |
param | ) |
const |
|
inline |
get a value of configuration parameter from default domain
- Parameters
-
- Returns
- a string value or empty string if parameter is not defined.
References getValue().
Referenced by getValue().
◆ operator=()
◆ BASE_URL
constexpr char const* libcdoc::Configuration::BASE_URL = "BASE_URL" |
|
staticconstexpr |
MID/SID base url (domain is SMART_ID or MOBILE_ID)
◆ KEYSERVER_FETCH_URL
constexpr char const* libcdoc::Configuration::KEYSERVER_FETCH_URL = "KEYSERVER_FETCH_URL" |
|
staticconstexpr |
Fetch URL of keyserver (Domain is server id)
◆ KEYSERVER_SEND_URL
constexpr char const* libcdoc::Configuration::KEYSERVER_SEND_URL = "KEYSERVER_SEND_URL" |
|
staticconstexpr |
Send URL of keyserver (Domain is server id)
◆ MID_DOMAIN
constexpr char const* libcdoc::Configuration::MID_DOMAIN = "MOBILE_ID" |
|
staticconstexpr |
Domain of Mobile ID settings.
◆ PHONE_NUMBER
constexpr char const* libcdoc::Configuration::PHONE_NUMBER = "PHONE_NUMBER" |
|
staticconstexpr |
Mobile ID phone number (domain is MOBILE_ID)
◆ RP_NAME
constexpr char const* libcdoc::Configuration::RP_NAME = "RP_NAME" |
|
staticconstexpr |
MID/SID relying party name (domain is SMART_ID or MOBILE_ID)
◆ RP_UUID
constexpr char const* libcdoc::Configuration::RP_UUID = "RP_UUID" |
|
staticconstexpr |
MID/SID relying party UUID (domain is SMART_ID or MOBILE_ID)
◆ SHARE_SERVER_URLS
constexpr char const* libcdoc::Configuration::SHARE_SERVER_URLS = "SHARE_SERVER_URLS" |
|
staticconstexpr |
JSON array of share server base urls (Domain is server id)
◆ SHARE_SIGNER
constexpr char const* libcdoc::Configuration::SHARE_SIGNER = "SHARE_SIGNER" |
|
staticconstexpr |
Method for signing keyshare tickets (SMART_ID or MOBILE_ID)
◆ SID_DOMAIN
constexpr char const* libcdoc::Configuration::SID_DOMAIN = "SMART_ID" |
|
staticconstexpr |
Domain of SmartID settings.
The documentation for this struct was generated from the following file: