diff options
author | Ed Tanous <ed@tanous.net> | 2020-12-17 19:54:55 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2020-12-18 23:21:35 +0300 |
commit | 81ce609e30274435b4f8c3fc65340c6b6b153b0c (patch) | |
tree | f07c0bb8f950f81adc853845e009d9d40e254468 /include/authorization.hpp | |
parent | f16f62633a64f386fd0382703ff0949ea177f457 (diff) | |
download | bmcweb-81ce609e30274435b4f8c3fc65340c6b6b153b0c.tar.xz |
Fix .clang-tidy
camelLower is not a type, camelBack is.
Changes were made automatically with clang-tidy --fix-errors
To be able to apply changes automatically, the only way I've found that
works was to build the version of clang/clang-tidy that yocto has, and
run the fix script within bitbake -c devshell bmcweb. Unfortunately,
yocto has clang-tidy 11, which can apparently find a couple extra errors
in tests we already had enabled. As such, a couple of those are also
included.
Tested:
Ran clang-tidy-11 and got a clean result.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9d1080b67f0342229c2f267160849445c065ca51
Diffstat (limited to 'include/authorization.hpp')
-rw-r--r-- | include/authorization.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/authorization.hpp b/include/authorization.hpp index c0a84b661a..e32d9ade4c 100644 --- a/include/authorization.hpp +++ b/include/authorization.hpp @@ -37,12 +37,12 @@ static void cleanupTempSession(Request& req) #ifdef BMCWEB_ENABLE_BASIC_AUTHENTICATION static std::shared_ptr<persistent_data::UserSession> performBasicAuth(const boost::asio::ip::address& clientIp, - std::string_view auth_header) + std::string_view authHeader) { BMCWEB_LOG_DEBUG << "[AuthMiddleware] Basic authentication"; std::string authData; - std::string_view param = auth_header.substr(strlen("Basic ")); + std::string_view param = authHeader.substr(strlen("Basic ")); if (!crow::utility::base64Decode(param, authData)) { return nullptr; @@ -86,11 +86,11 @@ static std::shared_ptr<persistent_data::UserSession> #ifdef BMCWEB_ENABLE_SESSION_AUTHENTICATION static std::shared_ptr<persistent_data::UserSession> - performTokenAuth(std::string_view auth_header) + performTokenAuth(std::string_view authHeader) { BMCWEB_LOG_DEBUG << "[AuthMiddleware] Token authentication"; - std::string_view token = auth_header.substr(strlen("Token ")); + std::string_view token = authHeader.substr(strlen("Token ")); auto session = persistent_data::SessionStore::getInstance().loginSessionByToken(token); return session; @@ -132,7 +132,7 @@ static std::shared_ptr<persistent_data::UserSession> return nullptr; } startIndex += sizeof("SESSION=") - 1; - auto endIndex = cookieValue.find(";", startIndex); + auto endIndex = cookieValue.find(';', startIndex); if (endIndex == std::string::npos) { endIndex = cookieValue.size(); |