| 299 | |
| 300 | |
| 301 | AuthenticationResult 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 | |
| 323 | AuthenticationResult createCombinedForbidden( |
no test coverage detected