summaryrefslogtreecommitdiff
path: root/include/authentication.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-07-01 02:50:15 +0300
committerEd Tanous <ed@tanous.net>2022-07-12 21:38:38 +0300
commit02cad96e3a83b0c9a01dbc87219c1b8b6681fa67 (patch)
treea2dab0f07fe50ed5708f3c6fea43b7d2af5419e7 /include/authentication.hpp
parentbb60f4ded18153718709e23dc1d648eb2ae13743 (diff)
downloadbmcweb-02cad96e3a83b0c9a01dbc87219c1b8b6681fa67.tar.xz
Fix const correctness issues
cppcheck correctly notes that a lot of variables in the new code can be const. Make most of them const. Tested: WIP Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I8f37b6353fd707923f533e1d61c5b5419282bf23
Diffstat (limited to 'include/authentication.hpp')
-rw-r--r--include/authentication.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/authentication.hpp b/include/authentication.hpp
index 3c1ca484d9..8d59be406e 100644
--- a/include/authentication.hpp
+++ b/include/authentication.hpp
@@ -21,7 +21,7 @@ namespace crow
namespace authentication
{
-static void cleanupTempSession(Request& req)
+static void cleanupTempSession(const Request& req)
{
// TODO(ed) THis should really be handled by the persistent data
// middleware, but because it is upstream, it doesn't have access to the
@@ -260,7 +260,7 @@ static std::shared_ptr<persistent_data::UserSession>
[[maybe_unused]] static std::shared_ptr<persistent_data::UserSession>
authenticate(
- boost::asio::ip::address& ipAddress [[maybe_unused]],
+ const boost::asio::ip::address& ipAddress [[maybe_unused]],
Response& res [[maybe_unused]], boost::beast::http::verb method,
const boost::beast::http::header<true>& reqHeader,
[[maybe_unused]] const std::shared_ptr<persistent_data::UserSession>&