auth.h
Go to the documentation of this file.
00001 #ifndef CPR_AUTH_H
00002 #define CPR_AUTH_H
00003 
00004 #include <string>
00005 
00006 #include "defines.h"
00007 
00008 namespace cpr {
00009 
00010 class Authentication {
00011   public:
00012     template <typename UserType, typename PassType>
00013     Authentication(UserType&& username, PassType&& password)
00014             : username_{CPR_FWD(username)}, password_{CPR_FWD(password)},
00015               auth_string_{username_ + ":" + password_} {}
00016 
00017     const char* GetAuthString() const noexcept;
00018 
00019   private:
00020     std::string username_;
00021     std::string password_;
00022     std::string auth_string_;
00023 };
00024 
00025 } // namespace cpr
00026 
00027 #endif


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:01