#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/http/http_auth.h"
#include <algorithm>
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "net/base/net_errors.h"
#include "net/dns/host_resolver.h"
#include "net/http/http_auth_challenge_tokenizer.h"
#include "net/http/http_auth_handler.h"
#include "net/http/http_auth_handler_factory.h"
#include "net/http/http_auth_scheme.h"
#include "net/http/http_request_headers.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
#include "net/log/net_log.h"
#include "net/log/net_log_values.h"
namespace net {
namespace {
const char* const kSchemeNames[] = …;
}
HttpAuth::Identity::Identity() = default;
void HttpAuth::ChooseBestChallenge(
HttpAuthHandlerFactory* http_auth_handler_factory,
const HttpResponseHeaders& response_headers,
const SSLInfo& ssl_info,
const NetworkAnonymizationKey& network_anonymization_key,
Target target,
const url::SchemeHostPort& scheme_host_port,
const std::set<Scheme>& disabled_schemes,
const NetLogWithSource& net_log,
HostResolver* host_resolver,
std::unique_ptr<HttpAuthHandler>* handler) { … }
HttpAuth::AuthorizationResult HttpAuth::HandleChallengeResponse(
HttpAuthHandler* handler,
const HttpResponseHeaders& response_headers,
Target target,
const std::set<Scheme>& disabled_schemes,
std::string* challenge_used) { … }
std::string HttpAuth::GetChallengeHeaderName(Target target) { … }
std::string HttpAuth::GetAuthorizationHeaderName(Target target) { … }
std::string HttpAuth::GetAuthTargetString(Target target) { … }
const char* HttpAuth::SchemeToString(Scheme scheme) { … }
HttpAuth::Scheme HttpAuth::StringToScheme(const std::string& str) { … }
const char* HttpAuth::AuthorizationResultToString(
AuthorizationResult authorization_result) { … }
base::Value::Dict HttpAuth::NetLogAuthorizationResultParams(
const char* name,
AuthorizationResult authorization_result) { … }
}