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

Method setBasicHttpAuthenticator

src/tests/logging_tests.cpp:54–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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