MCPcopy Create free account
hub / github.com/apache/mesos / createBasicAuthenticator

Function createBasicAuthenticator

src/common/http.cpp:1284–1301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1282namespace {
1283
1284Result<process::http::authentication::Authenticator*> createBasicAuthenticator(
1285 const string& realm,
1286 const string& authenticatorName,
1287 const Option<Credentials>& credentials)
1288{
1289 if (credentials.isNone()) {
1290 return Error(
1291 "No credentials provided for the default '" +
1292 string(internal::DEFAULT_BASIC_HTTP_AUTHENTICATOR) +
1293 "' HTTP authenticator for realm '" + realm + "'");
1294 }
1295
1296 LOG(INFO) << "Creating default '"
1297 << internal::DEFAULT_BASIC_HTTP_AUTHENTICATOR
1298 << "' HTTP authenticator for realm '" << realm << "'";
1299
1300 return BasicAuthenticatorFactory::create(realm, credentials.get());
1301}
1302
1303
1304#ifdef USE_SSL_SOCKET

Callers 2

foreachFunction · 0.85

Calls 4

ErrorFunction · 0.50
createFunction · 0.50
isNoneMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected