public User Login(string userName, string password, bool isPersistent, string customData) { // Check password and persist _currentUser = _session.Single<User>(u => u.Name == userName); _eventAggregator.GetEvent<LoginEvent>().Publish(_currentUser); return _currentUser; }
public void Logout() { _currentUser = null; _eventAggregator.GetEvent<LogoutEvent>().Publish(_currentUser); }