| 1324 | |
| 1325 | |
| 1326 | Result<process::http::authentication::Authenticator*> createCustomAuthenticator( |
| 1327 | const string& realm, |
| 1328 | const string& authenticatorName) |
| 1329 | { |
| 1330 | if (!modules::ModuleManager::contains< |
| 1331 | process::http::authentication::Authenticator>(authenticatorName)) { |
| 1332 | return Error( |
| 1333 | "HTTP authenticator '" + authenticatorName + "' not found. " |
| 1334 | "Check the spelling (compare to '" + |
| 1335 | string(internal::DEFAULT_BASIC_HTTP_AUTHENTICATOR) + |
| 1336 | "') or verify that the authenticator was loaded " |
| 1337 | "successfully (see --modules)"); |
| 1338 | } |
| 1339 | |
| 1340 | LOG(INFO) << "Creating '" << authenticatorName << "' HTTP authenticator " |
| 1341 | << "for realm '" << realm << "'"; |
| 1342 | |
| 1343 | return modules::ModuleManager::create< |
| 1344 | process::http::authentication::Authenticator>(authenticatorName); |
| 1345 | } |
| 1346 | |
| 1347 | } // namespace { |
| 1348 |
no test coverage detected