From c7a29d366c958bd20509ba88d17c4fb3cb38d7ef Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Wed, 23 Oct 2019 13:30:04 -0700 Subject: Remove IBM specific variable name Considering that the webui is no longer an "IBM" specific entity, and is now the standard for the project, there's no need for this variable to call it out explicitly. Update comment and variable name to be more correct. Tested: No functional change, only comments. Signed-off-by: Ed Tanous Change-Id: I2169876c38ccd558a3cfcfc61637720bd290b3ee --- include/token_authorization_middleware.hpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/token_authorization_middleware.hpp b/include/token_authorization_middleware.hpp index abdedaf..efa691c 100644 --- a/include/token_authorization_middleware.hpp +++ b/include/token_authorization_middleware.hpp @@ -285,6 +285,7 @@ template void requestRoutes(Crow& app) Middlewares...>::value, "token_authorization middleware must be enabled in app to use " "auth routes"); + BMCWEB_ROUTE(app, "/login") .methods( "POST"_method)([](const crow::Request& req, crow::Response& res) { @@ -292,7 +293,7 @@ template void requestRoutes(Crow& app) std::string_view username; std::string_view password; - bool looksLikeIbm = false; + bool looksLikePhosphorRest = false; // This object needs to be declared at this scope so the strings // within it are not destroyed before we can use them @@ -346,7 +347,7 @@ template void requestRoutes(Crow& app) dataIt->begin(); nlohmann::json::iterator passIt2 = dataIt->begin() + 1; - looksLikeIbm = true; + looksLikePhosphorRest = true; if (userIt2 != dataIt->end() && passIt2 != dataIt->end()) { @@ -404,10 +405,11 @@ template void requestRoutes(Crow& app) auto session = persistent_data::SessionStore::getInstance() .generateUserSession(username); - if (looksLikeIbm) + if (looksLikePhosphorRest) { - // IBM requires a very specific login structure, and - // doesn't actually look at the status code. + // Phosphor-Rest requires a very specific login + // structure, and doesn't actually look at the status + // code. // TODO(ed).... Fix that upstream res.jsonValue = { {"data", -- cgit v1.2.1