knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kris...@apache.org
Subject [knox] branch master updated: KNOX-718 - KnoxSSO login page doesn't display any feedback on error (#234)
Date Fri, 10 Jan 2020 16:28:24 GMT
This is an automated email from the ASF dual-hosted git repository.

krisden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new cc235fd  KNOX-718 - KnoxSSO login page doesn't display any feedback on error (#234)
cc235fd is described below

commit cc235fd1de6dbd09f9a4967736db9974a5136366
Author: Kevin Risden <risdenk@users.noreply.github.com>
AuthorDate: Fri Jan 10 11:27:57 2020 -0500

    KNOX-718 - KnoxSSO login page doesn't display any feedback on error (#234)
    
    Signed-off-by: Kevin Risden <krisden@apache.org>
---
 .../main/resources/applications/knoxauth/app/js/knoxauth.js | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
b/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
index 57bfff2..aff8bfc 100644
--- a/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
+++ b/gateway-applications/src/main/resources/applications/knoxauth/app/js/knoxauth.js
@@ -70,13 +70,14 @@ var login = function() {
                     redirectUrl = "redirecting.html?originalUrl=" + originalUrl;
                   }
                   redirect(redirectUrl);
-                }
-                else {
+                } else {
+                  $('#errorBox').show();
+                  $('#signInLoading').hide();
+                  $('#signIn').removeAttr('disabled');
                   if (request.status==401) {
-                    $('#errorBox').show();
-                    $('#signInLoading').hide();
-                    $('#signIn').removeAttr('disabled');
                     $('#errorBox .errorMsg').text("The username or password you entered is
incorrect.");
+                  } else {
+                    $('#errorBox .errorMsg').text("Response from " + request.responseURL
+ " - " + request.status + ": " + request.statusText);
                   }
                 }
             }
@@ -84,4 +85,4 @@ var login = function() {
     }
 
     _login();
-}
\ No newline at end of file
+}


Mime
View raw message