| .. | .. |
|---|
| 6 | 6 | import { Http, RequestOptions, Response, Headers } from '@angular/http'; |
|---|
| 7 | 7 | import { Observable } from 'rxjs/Observable'; |
|---|
| 8 | 8 | |
|---|
| 9 | | -import { LocalStorageService } from 'angular-2-local-storage'; |
|---|
| 9 | +import { Locker } from 'angular-safeguard'; |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | const SECURIS_TOKEN = "X-SECURIS-TOKEN"; |
|---|
| 12 | 12 | |
|---|
| .. | .. |
|---|
| 17 | 17 | |
|---|
| 18 | 18 | constructor($L: LocaleService, |
|---|
| 19 | 19 | private router: Router, |
|---|
| 20 | | - private store: LocalStorageService, |
|---|
| 20 | + private store: Locker, |
|---|
| 21 | 21 | private http: Http) { |
|---|
| 22 | 22 | super($L); |
|---|
| 23 | 23 | } |
|---|
| .. | .. |
|---|
| 65 | 65 | } |
|---|
| 66 | 66 | |
|---|
| 67 | 67 | logout() : void { |
|---|
| 68 | | - this.store.remove('user', 'token'); |
|---|
| 68 | + this.store.remove('user'); |
|---|
| 69 | + this.store.remove('token'); |
|---|
| 69 | 70 | this.router.navigate(['public/login']); |
|---|
| 70 | 71 | } |
|---|
| 71 | 72 | |
|---|