mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUAC-1126 Clear caches on logout.
This commit is contained in:
		| @@ -23,4 +23,4 @@ | ||||
| /** | ||||
|  * The module for authentication and management of tokens. | ||||
|  */ | ||||
| angular.module('auth', ['ngCookies']); | ||||
| angular.module('auth', ['ngCookies', 'rest']); | ||||
|   | ||||
| @@ -30,6 +30,7 @@ angular.module('auth').factory('authenticationService', ['$injector', | ||||
|     var $cookieStore = $injector.get('$cookieStore'); | ||||
|     var $http        = $injector.get('$http'); | ||||
|     var $q           = $injector.get('$q'); | ||||
|     var cacheService = $injector.get('cacheService'); | ||||
|  | ||||
|     var service = {}; | ||||
|  | ||||
| @@ -193,6 +194,9 @@ angular.module('auth').factory('authenticationService', ['$injector', | ||||
|      *     successful. | ||||
|      */ | ||||
|     service.logout = function logout() { | ||||
|          | ||||
|         // Clear all caches | ||||
|         cacheService.clearCaches(); | ||||
|  | ||||
|         // Clear authentication data | ||||
|         var token = service.getCurrentToken(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user