1#include "cpr/proxyauth.h"
2#include "cpr/util.h"
3
4namespace cpr {
5EncodedAuthentication::~EncodedAuthentication() noexcept {
6 util::secureStringClear(s&: auth_string_);
7}
8
9const char* EncodedAuthentication::GetAuthString() const noexcept {
10 return auth_string_.c_str();
11}
12
13bool ProxyAuthentication::has(const std::string& protocol) const {
14 return proxyAuth_.count(x: protocol) > 0;
15}
16
17const char* ProxyAuthentication::operator[](const std::string& protocol) {
18 return proxyAuth_[protocol].GetAuthString();
19}
20
21} // namespace cpr
22