public void DoAuthByEmailLinkRequested(object sender, AuthByEmailLinkEventArgs eventArgs) { if (AuthenticationByEmailLinkRequested != null) { AuthenticationByEmailLinkRequested.Invoke(sender, eventArgs); } }
private void MainEventBusOnAuthenticationByEmailLinkRequested(object sender, AuthByEmailLinkEventArgs authByEmailLinkEventArgs) { var userCommunicationChannels = _applicationDataProvider.UserCommunicationChannels.GetByEmail(authByEmailLinkEventArgs.Email); if (userCommunicationChannels != null) { var token = _applicationDataProvider.UserAuthenticationTokens.Create(); token.Token = Guid.NewGuid().ToString(); token.User = userCommunicationChannels.User; _applicationDataProvider.UserAuthenticationTokens.Push(token); } else { _mainEventBus.DoInviteUserByEmailRequested(this, authByEmailLinkEventArgs.Email); } }