master
 1import * as events from '../events';
 2import ApplicationCommand from './application-command';
 3
 4export default class LogoutCommand extends ApplicationCommand {
 5  constructor(eventAggregator, applicationStorage) {
 6    super();
 7    this.eventAggregator = eventAggregator;
 8    this.applicationStorage = applicationStorage;
 9  }
10
11  subscribeTo(eventAggregator) {
12    eventAggregator.subscribe(events.LOGOUT, this);
13  }
14
15  run(event) {
16    this.applicationStorage.delete('authentication_token');
17  }
18}