TLS method configuration
User is now able to turn on and off the TLS authentication method.
Tested:
No regression found in manual testing. By default everything works
as before, and disabling TLS method prevents user to authenticate
by it.
Tested with Redfish Service Validator, version 1.2.8
Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Change-Id: Ib7be1af659db568caa7e5b97e3844617586d7754
diff --git a/include/sessions.hpp b/include/sessions.hpp
index 7493494..f58c676 100644
--- a/include/sessions.hpp
+++ b/include/sessions.hpp
@@ -345,6 +345,7 @@
bool cookie = true;
bool sessionToken = true;
bool basic = true;
+ bool tls = true;
void fromJson(const nlohmann::json& j)
{
@@ -372,6 +373,10 @@
{
basic = *value;
}
+ else if (element.key() == "TLS")
+ {
+ tls = *value;
+ }
}
}
};
@@ -584,7 +589,8 @@
j = nlohmann::json{{"XToken", c.xtoken},
{"Cookie", c.cookie},
{"SessionToken", c.sessionToken},
- {"BasicAuth", c.basic}};
+ {"BasicAuth", c.basic},
+ {"TLS", c.tls}};
}
};
} // namespace nlohmann