summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-10-23 13:30:04 -0700
committerJames Feist <james.feist@linux.intel.com>2020-02-03 17:14:45 +0000
commitc7a29d366c958bd20509ba88d17c4fb3cb38d7ef (patch)
tree7943c056a868ff1b52c64163c3fa4fbd16ba69f9 /include
parentd887fff197b2fc3357bcbb1adb028521699a204a (diff)
downloadbmcweb-c7a29d366c958bd20509ba88d17c4fb3cb38d7ef.tar.gz
bmcweb-c7a29d366c958bd20509ba88d17c4fb3cb38d7ef.zip
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 <ed.tanous@intel.com> Change-Id: I2169876c38ccd558a3cfcfc61637720bd290b3ee
Diffstat (limited to 'include')
-rw-r--r--include/token_authorization_middleware.hpp12
1 files 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 <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& 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 <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& 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 <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& 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 <typename... Middlewares> void requestRoutes(Crow<Middlewares...>& 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",
OpenPOWER on IntegriCloud