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