necouchman commented on a change in pull request #455: GUACAMOLE-361: CAS 
global logout
URL: https://github.com/apache/guacamole-client/pull/455#discussion_r354490932
 
 

 ##########
 File path: 
extensions/guacamole-auth-cas/src/main/resources/controllers/casController.js
 ##########
 @@ -28,3 +28,16 @@ angular.module('guacCAS').controller('guacCASController', 
['$scope',
         window.location = $scope.field.authorizationURI;
 
 }]);
+/**
+ * Controller for the "GUAC_CAS_LOGOUT" field which deletes the GUAC_AUTH
+ * token in localStorage and redirects the user immediately to the CAS 
+ * logout URI
+ */
+angular.module('guacCAS').controller('guacCASLogoutController', ['$scope', 
+    function guacCASLogoutController($scope) {
+
+        // Redirect to logout URI
+        window.localStorage.removeItem("GUAC_AUTH");
 
 Review comment:
   I'm not sure this should call this `localStorage.removeItem()` method 
directly - I would think you want to use the methods built into the Guacamole 
AngularJS auth class that handle logout.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to