rsanchez
2017-04-13 849f8f0acbe896cac7e531fee6895442382318cc
securis/src/main/webapp/src/app/user.service.ts
....@@ -6,7 +6,7 @@
66 import { Http, RequestOptions, Response, Headers } from '@angular/http';
77 import { Observable } from 'rxjs/Observable';
88
9
-import { LocalStorageService } from 'angular-2-local-storage';
9
+import { Locker } from 'angular-safeguard';
1010
1111 const SECURIS_TOKEN = "X-SECURIS-TOKEN";
1212
....@@ -17,7 +17,7 @@
1717
1818 constructor($L: LocaleService,
1919 private router: Router,
20
- private store: LocalStorageService,
20
+ private store: Locker,
2121 private http: Http) {
2222 super($L);
2323 }
....@@ -65,7 +65,8 @@
6565 }
6666
6767 logout() : void {
68
- this.store.remove('user', 'token');
68
+ this.store.remove('user');
69
+ this.store.remove('token');
6970 this.router.navigate(['public/login']);
7071 }
7172