MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / make_basic_authentication_header

Function make_basic_authentication_header

dependencies/httplib/httplib.h:4434–4440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4432}
4433
4434inline std::pair<std::string, std::string>
4435make_basic_authentication_header(const std::string &username,
4436 const std::string &password, bool is_proxy) {
4437 auto field = "Basic " + detail::base64_encode(username + ":" + password);
4438 auto key = is_proxy ? "Proxy-Authorization" : "Authorization";
4439 return std::make_pair(key, std::move(field));
4440}
4441
4442inline std::pair<std::string, std::string>
4443make_bearer_token_authentication_header(const std::string &token,

Callers 1

write_requestMethod · 0.85

Calls 1

base64_encodeFunction · 0.85

Tested by

no test coverage detected