/** * Created by robin on 11/1/15. */ (function () { 'use strict'; angular.module('luticateAuth') .factory('luticateAuthCacheDataAccess', ['localStorageService', function (localStorageService) { var luticateAuthCache = {}; luticateAuthCache.setUser = function(user) { localStorageService.set('lu_user', user); }; luticateAuthCache.getUser = function() { return localStorageService.get('lu_user'); }; luticateAuthCache.removeUser = function() { localStorageService.remove('lu_user'); }; luticateAuthCache.setEffectivePermissions = function(permissions) { localStorageService.set('lu_effective_permissions', permissions); }; luticateAuthCache.getEffectivePermissions = function() { return localStorageService.get('lu_effective_permissions'); }; luticateAuthCache.removeEffectivePermissions = function() { localStorageService.remove('lu_effective_permissions'); }; luticateAuthCache.setEffectiveSettings = function(settings) { localStorageService.set('lu_effective_settings', settings); }; luticateAuthCache.getEffectiveSettings = function() { return localStorageService.get('lu_effective_settings'); }; luticateAuthCache.removeEffectiveSettings = function() { localStorageService.remove('lu_effective_settings'); }; return luticateAuthCache; }]); })();