From c628e0f9603e45423aeb1c174a906e26b3855164 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Thu, 4 Dec 2025 15:14:58 -0600 Subject: [PATCH] Fix basic auth --- examples/tests.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/tests.cpp diff --git a/examples/tests.cpp b/examples/tests.cpp new file mode 100644 index 0000000..d0abf20 --- /dev/null +++ b/examples/tests.cpp @@ -0,0 +1,13 @@ +#include "TessesFramework/TessesFramework.hpp" +int main(int argc, char** argv) +{ + Tesses::Framework::TF_Init(); + std::string theEncoded="dXNlcjpwYXNz"; + Tesses::Framework::Http::ServerContext ctx(nullptr); + ctx.requestHeaders.SetValue("Authorization","Basic " + theEncoded); + std::string user; + std::string pass; + std::cout << Tesses::Framework::Http::BasicAuthServer::GetCreds(ctx,user,pass) << std::endl; + std::cout << user << std::endl; + std::cout << pass << std::endl; +} \ No newline at end of file