1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 08:47:17 +01:00
SqMod/vendor/CPR/cpr/proxyauth.cpp

31 lines
772 B
C++
Raw Permalink Normal View History

2021-07-02 16:44:48 +02:00
#include "cpr/proxyauth.h"
#include "cpr/util.h"
2021-07-02 16:44:48 +02:00
namespace cpr {
EncodedAuthentication::~EncodedAuthentication() noexcept {
util::secureStringClear(username);
util::secureStringClear(password);
}
const std::string& EncodedAuthentication::GetUsername() const {
return username;
}
const std::string& EncodedAuthentication::GetPassword() const {
return password;
2021-07-02 16:44:48 +02:00
}
bool ProxyAuthentication::has(const std::string& protocol) const {
return proxyAuth_.count(protocol) > 0;
}
const char* ProxyAuthentication::GetUsername(const std::string& protocol) {
return proxyAuth_[protocol].username.c_str();
}
const char* ProxyAuthentication::GetPassword(const std::string& protocol) {
return proxyAuth_[protocol].password.c_str();
2021-07-02 16:44:48 +02:00
}
} // namespace cpr