summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2023-03-03 21:32:36 +0300
committerEd Tanous <ed@tanous.net>2023-08-17 02:31:20 +0300
commit2deee1b3cf4c520e966af97ebfe14b71a89afa66 (patch)
tree93972abcfc25a152acf716b6e947b12bc5b8ca0b /include
parent9bdc8b55d35aa228b065bc44fa6992250c67dc9b (diff)
downloadbmcweb-2deee1b3cf4c520e966af97ebfe14b71a89afa66.tar.xz
Change unauthorized message if no UI is installed
This "Unauthorized" message has been a constant source of confusion for users that forget to install a UI. This commit updates the message to be more clear, and present users with some hints that they have forgotten to install a webui if they expected the auth to succeed. Tested: String change only. Code compiles. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic68e4622082caf5e32e496ec56f0c8b409b91990
Diffstat (limited to 'include')
-rw-r--r--include/forward_unauthorized.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/forward_unauthorized.hpp b/include/forward_unauthorized.hpp
index 9ba2b1cef9..5d5e744f47 100644
--- a/include/forward_unauthorized.hpp
+++ b/include/forward_unauthorized.hpp
@@ -34,7 +34,8 @@ inline void sendUnauthorized(std::string_view url,
// If we don't have a webui installed, just return an unauthorized
// body
res.result(boost::beast::http::status::unauthorized);
- res.body() = "Unauthorized";
+ res.body() =
+ "No authentication provided, and no login UI present to forward to.";
return;
}