mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
9298065cef
CPR has features disabled and PCRE is fully disabled until updated to new code.
31 lines
772 B
C++
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
|