mirror of
https://onedev.site.tesses.net/tesses-framework
synced 2026-02-08 15:55:46 +00:00
Fix basic auth
This commit is contained in:
13
examples/tests.cpp
Normal file
13
examples/tests.cpp
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user