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

Function createCombinedUnauthorized

src/tests/http_authentication_tests.cpp:301–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299
300
301AuthenticationResult createCombinedUnauthorized(
302 const vector<MockAuthenticator>& authenticators)
303{
304 AuthenticationResult result;
305 vector<string> headers;
306 vector<string> bodies;
307
308 foreach (const MockAuthenticator& authenticator, authenticators) {
309 headers.push_back(authenticator.scheme() + " realm=\"" + REALM + "\"");
310 bodies.push_back(
311 "\"" + authenticator.scheme() + "\" authenticator returned:\n" +
312 authenticator.scheme() + " unauthorized");
313 }
314
315 result.unauthorized = Unauthorized(
316 {strings::join(",", headers)},
317 strings::join("\n\n", bodies));
318
319 return result;
320}
321
322
323AuthenticationResult createCombinedForbidden(

Callers 1

TESTFunction · 0.85

Calls 2

UnauthorizedClass · 0.85
joinFunction · 0.50

Tested by

no test coverage detected