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

Method setBasicHttpAuthenticator

src/tests/metrics_tests.cpp:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53{
54protected:
55 void setBasicHttpAuthenticator(
56 const std::string& realm,
57 const Credentials& credentials)
58 {
59 Try<process::http::authentication::Authenticator*> authenticator =
60 BasicAuthenticatorFactory::create(realm, credentials);
61
62 ASSERT_SOME(authenticator);
63
64 // Add this realm to the set of realms which will be unset during teardown.
65 realms.insert(realm);
66
67 // Pass ownership of the authenticator to libprocess.
68 AWAIT_READY(setAuthenticator(
69 realm,
70 Owned<process::http::authentication::Authenticator>(
71 authenticator.get())));
72 }
73
74 void TearDown() override
75 {

Callers

nothing calls this directly

Calls 4

setAuthenticatorFunction · 0.85
insertMethod · 0.80
createFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected