#pragma once #include "HttpServer.hpp" namespace Tesses::Framework::Http { class BasicAuthServer : public Tesses::Framework::Http::IHttpServer { public: std::shared_ptr server; std::function authorization; std::string realm; BasicAuthServer(); BasicAuthServer(std::shared_ptr server, std::function auth,std::string realm="Protected Content"); bool Handle(ServerContext& ctx); static bool GetCreds(ServerContext& ctx, std::string& user, std::string& pass); }; }