knacktim opened a new pull request #573:
URL: https://github.com/apache/guacamole-client/pull/573


   This is my attempt at a solution for GUACAMOLE-680.  From the discussion in 
this https://github.com/apache/guacamole-client/pull/346 I wanted to create a 
utility 'service' that would handle this use case.
   
   I thought about making this generic and adding handlers for other 
events...but I don't think that is the route that we want to go.  This is a 
specific use case for the user logout case so it should be handled by the 
service that handles those actions.  The AngularJS broadcast system should be 
good enough for other situations.
   
   Example usage:
   ```javascript
   angular.module('someModule').run(['authenticationService', 
       function logoutListener(authenticationService) {
   
       authenticationService.registerLogoutHandler(() => {
          // Do your actions that are needed here.
       })
   
   }]);
   
   // Ensure the openid module is loaded along with the rest of the app
   angular.module('index').requires.push('someModule');
   ```


----------------------------------------------------------------
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]


Reply via email to