knacktim edited a comment on pull request #573:
URL: https://github.com/apache/guacamole-client/pull/573#issuecomment-724884087


   Used this to implement 
[GUACAMOLE-519](https://issues.apache.org/jira/browse/GUACAMOLE-519).  Here is 
what it looked like:
   ```javascript
   angular.module('openid').run(['$routeParams', 'authenticationService', 
       function openIDLogoutListener($routeParams, authenticationService) {
   
       let config = {} // TODO get these from backend
   
       authenticationService.registerLogoutHandler(() => {
         if ($routeParams && Object.prototype.hasOwnProperty.call($routeParams, 
'id_token')) {
           $.get({
             url: config['openid_logout_endpoint'],
             dataType: 'application/json',
             async: false,
             data: {
               client_id: config['openid_client_id'],
               id_token_hint: $routeParams.id_token
             },
             success: function(resp) {
               console.log("Success");
             },
             error: function() {
               console.error("Error when trying to log out");
             }
           })
         }
       })
   
   }]);
   
   // Ensure the openid module is loaded along with the rest of the app
   angular.module('index').requires.push('openid');
   ```


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