#include <userver/storages/secdist/secdist.hpp>
Client to retrieve credentials from the components::Secdist.
Declare a type that would work with the credentials:
Fill the components::Secdist config
from file with the secure data:
Retrieve SecdistConfig from components::Secdist and get the type from it:
Json with secure data can also be loaded from environment variable with name defined in environment_secrets_key
. Sample variable value: {"user-passwords":{"username":"password","another username":"another password"}}
. It has the same format as data from file. If both sources are presented, data from environment variable will be merged with data from file (json objects will be merged, duplicate fields of other types will be overridden by data from environment variable).
Definition at line 78 of file secdist.hpp.
Classes | |
struct | Settings |
Public Member Functions | |
SecdistConfig (const Settings &settings) | |
template<typename T > | |
const T & | Get () const |
Static Public Member Functions | |
template<typename T > | |
static std::size_t | Register (std::function< std::any(const formats::json::Value &)> &&factory) |
|
inline |
Definition at line 95 of file secdist.hpp.
|
inlinestatic |
Definition at line 89 of file secdist.hpp.