dengzhhu653 commented on code in PR #5561:
URL: https://github.com/apache/hive/pull/5561#discussion_r1868554808


##########
service/src/java/org/apache/hive/service/servlet/LoginServlet.java:
##########
@@ -36,11 +36,17 @@ public LoginServlet(LdapAuthService ldapAuthService) {
 
   @Override
   public void doPost(HttpServletRequest request, HttpServletResponse response) 
{
-    ldapAuthService.authenticate(request, response);
-    RequestDispatcher dispatcher = 
request.getRequestDispatcher(HiveServer2.HS2_WEBUI_ROOT_URI);
+    boolean success = ldapAuthService.authenticate(request, response);
     PrintWriter out = null;
     try {
       out = response.getWriter();
+      final RequestDispatcher dispatcher;
+      if (success) {
+        dispatcher = 
request.getRequestDispatcher(HiveServer2.HS2_WEBUI_ROOT_URI);
+      } else {
+        request.setAttribute("login_failure_message", "Invalid username or 
password");

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to