mike-jumper commented on code in PR #815:
URL: https://github.com/apache/guacamole-client/pull/815#discussion_r1145751981


##########
guacamole/src/main/frontend/src/app/index/controllers/indexController.js:
##########
@@ -323,6 +329,25 @@ angular.module('index').controller('indexController', 
['$scope', '$injector',
 
     });
 
+    // Alert user to authentication errors that occur in the absence of an
+    // interactive login form
+    $scope.$on('guacLoginFailed', function loginFailed(event, parameters, 
error) {
+
+        // All errors related to an interactive login form are handled 
elsewhere
+        if ($scope.applicationState === ApplicationState.AWAITING_CREDENTIALS
+                || error.type === Error.Type.INSUFFICIENT_CREDENTIALS
+                || error.type === Error.Type.INVALID_CREDENTIALS)
+            return;
+
+        $scope.applicationState = ApplicationState.AUTOMATIC_LOGIN_REJECTED;
+        $scope.page.title = 'APP.NAME';
+        $scope.page.bodyClassName = '';

Review Comment:
   Sure - I can make this better.



-- 
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: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to