Authentication for streaming clients

This commit is contained in:
badaix 2025-02-08 23:06:56 +01:00
parent 67fd20619d
commit 02b8033728
20 changed files with 302 additions and 132 deletions

View file

@ -60,16 +60,23 @@ struct ClientSettings
/// Server settings
struct Server
{
/// Auth info
struct Auth
{
/// the scheme (Basic, Plain, bearer, ...)
std::string scheme;
/// the param (base64 encoded "<user>:<password>", "<user>:<password>", token, ...)
std::string param;
};
/// server host or IP address
std::string host;
/// protocol: "tcp", "ws" or "wss"
std::string protocol{"tcp"};
/// server port
size_t port{1704};
/// username
std::optional<std::string> username;
/// password
std::optional<std::string> password;
/// auth info
std::optional<Auth> auth;
/// server certificate
std::optional<std::filesystem::path> server_certificate;
/// Certificate file