20 template <
typename UserType,
typename PassType>
22 : username_{XXHR_FWD(username)}, password_{XXHR_FWD(password)},
23 auth_string_{username_ +
":" + password_} {}
25 const char* GetAuthString()
const noexcept {
return auth_string_.data(); }
28 std::string username()
const {
return username_; }
30 std::string password()
const {
return password_; }
33 std::string username_;
34 std::string password_;
35 std::string auth_string_;
main library namespace
Definition: api.hpp:19
Some Web APIs requires authenticating via HTTP Basic auth ( i.e. base64 encoded user and password aut...
Definition: auth.hpp:16
Authentication(UserType &&username, PassType &&password)
Specify username and password for basic auth.
Definition: auth.hpp:21