Remove proprietary OEMSession support

Per https://gerrit.openbmc.org/c/openbmc/bmcweb/+/56088, this feature
would be supported to the end of 2022, at which point people will have
moved over to the standard Context parameter in the DMTF-published
Session schema.

Tested: Code removal. Code compiles.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I0ae832bde740b025150242085bf1d2909ed1ec21
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index b3b4e7a..5ae6674 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -41,12 +41,6 @@
     {
         res.jsonValue["Context"] = *session.clientId;
     }
-// The below implementation is deprecated in leiu of Session.Context
-#ifdef BMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE
-    res.jsonValue["Oem"]["OpenBMC"]["@odata.type"] =
-        "#OemSession.v1_0_0.Session";
-    res.jsonValue["Oem"]["OpenBMC"]["ClientID"] = session.clientId.value_or("");
-#endif
 }
 
 inline void
@@ -190,11 +184,9 @@
     }
     std::string username;
     std::string password;
-    std::optional<nlohmann::json> oemObject;
     std::optional<std::string> clientId;
     if (!json_util::readJsonPatch(req, asyncResp->res, "UserName", username,
-                                  "Password", password, "Context", clientId,
-                                  "Oem", oemObject))
+                                  "Password", password, "Context", clientId))
     {
         return;
     }
@@ -223,33 +215,6 @@
                                             "Invalid username or password");
         return;
     }
-#ifdef BMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE
-    if (oemObject)
-    {
-        std::optional<nlohmann::json> bmcOem;
-        if (!json_util::readJson(*oemObject, asyncResp->res, "OpenBMC", bmcOem))
-        {
-            return;
-        }
-
-        std::optional<std::string> oemClientId;
-        if (!json_util::readJson(*bmcOem, asyncResp->res, "ClientID",
-                                 oemClientId))
-        {
-            BMCWEB_LOG_ERROR << "Could not read ClientId";
-            return;
-        }
-        if (oemClientId)
-        {
-            if (clientId)
-            {
-                messages::propertyValueConflict(*oemClientId, *clientId);
-                return;
-            }
-            clientId = *oemClientId;
-        }
-    }
-#endif
 
     // User is authenticated - create session
     std::shared_ptr<persistent_data::UserSession> session =