auth.h
Go to the documentation of this file.
1 #ifndef CPR_AUTH_H
2 #define CPR_AUTH_H
3 
4 #include <string>
5 
6 #include "cpr/defines.h"
7 
8 namespace cpr {
9 
11  public:
12  template <typename UserType, typename PassType>
13  Authentication(UserType&& username, PassType&& password)
14  : username_{CPR_FWD(username)}, password_{CPR_FWD(password)},
15  auth_string_{username_ + ":" + password_} {}
16 
17  const char* GetAuthString() const noexcept;
18 
19  private:
23 };
24 
25 } // namespace cpr
26 
27 #endif
std::string username_
Definition: auth.h:20
std::string password_
Definition: auth.h:21
Authentication(UserType &&username, PassType &&password)
Definition: auth.h:13
::std::string string
Definition: gtest-port.h:1129
const char * GetAuthString() const noexcept
Definition: auth.cpp:5
static char * password
Definition: unit1304.c:27
#define CPR_FWD(...)
Definition: defines.h:6
std::string auth_string_
Definition: auth.h:22
Definition: auth.cpp:3


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:08