1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00
SqMod/vendor/CPR/cpr/proxyauth.cpp
Sandu Liviu Catalin 9298065cef Update WIP discord and some vendors.
CPR has features disabled and PCRE is fully disabled until updated to new code.
2023-08-05 21:31:33 +03:00

31 lines
772 B
C++

#include "cpr/proxyauth.h"
#include "cpr/util.h"
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;
}
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();
}
} // namespace cpr