public Login(IPlayer player, ILoginHandler loginHandler) { this.player = player; this.loginHandler = loginHandler; loginHandler.OnLoginAck += onLoginAck; }
public LoginCommandsModule(IActionFactory actionFactory, ITribeManager tribeManager, IDbManager dbManager, ILocker locker, IWorld world, Procedure procedure, ICityFactory cityFactory, ILocationStrategyFactory locationStrategyFactory, IBarbarianTribeManager barbarianTribeManager, CallbackProcedure callbackProcedure, IChannel channel, IThemeManager themeManager, IPlayerFactory playerFactory, ILoginHandler loginHandler) { this.actionFactory = actionFactory; this.tribeManager = tribeManager; this.dbManager = dbManager; this.locker = locker; this.world = world; this.procedure = procedure; this.callbackProcedure = callbackProcedure; this.channel = channel; this.themeManager = themeManager; this.playerFactory = playerFactory; this.loginHandler = loginHandler; this.cityFactory = cityFactory; this.locationStrategyFactory = locationStrategyFactory; this.barbarianTribeManager = barbarianTribeManager; }
public AuthController(ILogger <AuthController> logger, ILoginHandler loginHandler, IUserService userService, ILoginInfo loginInfo) { _logger = logger; _loginHandler = loginHandler; _userService = userService; _loginInfo = loginInfo; }
public void Setup() { // Participant Setup participants = new List <Participant> { new Participant { Email = "*****@*****.**", Age = DateTime.Now, English = true, Gender = true, IdParticipant = 0, Password = "******" } }.AsQueryable(); // Required to do this. If not the "mock" does not recognize "part" in uut.RegisterParticipantDB mockSet = new Mock <DbSet <Participant> >(); mockSet.As <IQueryable <Participant> >().Setup(m => m.Provider).Returns(participants.Provider); mockSet.As <IQueryable <Participant> >().Setup(m => m.Expression).Returns(participants.Expression); mockSet.As <IQueryable <Participant> >().Setup(m => m.ElementType).Returns(participants.ElementType); mockSet.As <IQueryable <Participant> >().Setup(m => m.GetEnumerator()). Returns((IEnumerator <Participant>)participants.GetEnumerator()); mockContext = new Mock <BachelorBackEnd.bachelordbContext>(); mockContext.Setup(c => c.Participant).Returns(mockSet.Object); uut = new LoginHandler(mockContext.Object); }
private void BuildConfig() { CheckIsBuild(); if (connectionInfos == null) { throw new InvalidOperationException("Connections is not config."); } if (serializer == null) { throw new InvalidOperationException("Serializer is not config."); } if (communicationFactory == null) { throw new InvalidOperationException("CommunicationFactory is not config."); } if (protocolStackFactory == null) { protocolStackFactory = new DefaultProtocolStackFactory(); } if (loginHandler == null) { loginHandler = new DefaultLoginHandler(null, serializer, LoggerManager.ClientLoggerFactory); } if (passiveClosedStrategy == null) { passiveClosedStrategy = new DefaultPassiveClosedStrategy(new DefaultPassiveClosedStrategyConfig(), LoggerManager.ClientLoggerFactory); } }
public AuthController(IAuthService service, ILoginHandler loginHandler, IpHelper ipHelper, ILoginClaimsExtendProvider claimsExtendProvider) { _service = service; _loginHandler = loginHandler; _ipHelper = ipHelper; _claimsExtendProvider = claimsExtendProvider; }
public BlockedApiLoginHandler(ILoginHandler loginHandler, IUserContext userContext, ILogger logger, IVpnConnectionManager connectionManager) { this._loginHandler = loginHandler; this._userContext = userContext; this._logger = logger; this._connectionManager = connectionManager; }
public LoginViewModel(ILoginHandler loginHandler, IBrowser browser) { this._loginHandler = loginHandler; this._browser = browser; this.< Login > k__BackingField = new RelayCommand <PasswordBox>(new Action <PasswordBox>(this.LoginCommand), (PasswordBox passwordBox) => !this.Connecting); this.< ForgotPassword > k__BackingField = new RelayCommand(new Action(this.ForgotPasswordCommand)); this.StartAnimation = true; }
public LoginViewModel(ILoginHandler loginHandler, IBrowser browser, EventFacade eventFacade) { this._loginHandler = loginHandler; this._browser = browser; this._eventFacade = eventFacade; this._loginHandler.UserContext.add_UserLoginFailed(new EventHandler <UserEventArgs>(this.SetCredentials)); this._loginHandler.UserContext.add_UserLoggedOut(new EventHandler <UserEventArgs>(this.ClearCredentials)); }
/// <summary> /// 配置登录处理器 /// </summary> /// <param name="loginHandler">登录处理器</param> /// <returns></returns> public INodeClientBuilder ConfigLoginHandler(ILoginHandler loginHandler) { CheckIsBuild(); this.loginHandler = loginHandler; return(this); }
public RegisterViewModel(EventFacade eventFacade, IBrowser browser, ILoginHandler loginHandler) { this._eventFacade = eventFacade; this._browser = browser; this._loginHandler = loginHandler; this.< Register > k__BackingField = new RelayCommand <PasswordBox>(new Action <PasswordBox>(this.RegisterCommand), (PasswordBox passwordBox) => !this.Connecting); this.< Back > k__BackingField = new RelayCommand(new Action(this.BackCommand)); }
/// <summary> /// Constructor - uses dependency injection and calls the base constructor. /// </summary> /// <param name="svc">DI service.</param> /// <param name="logger">DI logger</param> public AuthenticationController(IAPIModelService <UsersDTO> service, ILoginHandler <UsersDTO> loginHandler, ILogger <AuthenticationController> logger, IConfiguration config, UserSettings settings) { _loginHandler = loginHandler; Logger = logger; this.config = config; this.settings = settings; this.Service = service; }
public ConnectApiHandler(IConnectionManager connectionManager, ILoginHandler loginHandler, IExceptionHandler exHandler) { _connectionManager = connectionManager; _loginHandler = loginHandler; _exHandler = exHandler; Me = new MyAccount(); _mappingEngine = GetMapper(); SetupListeners(); }
public void ClearPassword() { Password?.Clear(); ILoginHandler handler = IoC.Get <ILoginHandler>(); if (handler != null) { handler.ClearPassword(); } }
public RealizarLoginParaAutenticarNoSistemaSteps(ScenarioContext context) { var _serviceProvider = new StartInjection().ServiceProvider; _loginHandler = _serviceProvider.GetService <ILoginHandler>(); _dataStart = _serviceProvider.GetService <IDataStart>(); // Popula base de dados //_dataStart.Seed(); _context = context; }
public void LoginParticipantDB_Login_WithInValidUser() { //Setup //Act - trying to log in uut = new LoginHandler(mockContext.Object); var actual = uut.LoginResearcherDB("bla", "bla"); //Assert - Checking Loginstatus.IsSuccess. Assert.IsFalse(actual.success); }
public void LoginResearcherDB_Login_WithInvalidEmail() { //Setup //Act - trying to log in uut = new LoginHandler(mockContext.Object); var actual = uut.LoginResearcherDB("bla", "123456"); //Assert - Checking Loginstatus.ErrorMessage. Assert.AreEqual(actual.errormessage, "No researcher with this email exists"); }
public void LoginResearcherDB_Login_WithInvalidPassword() { //Setup //Act - trying to log in uut = new LoginHandler(mockContext.Object); var actual = uut.LoginResearcherDB("*****@*****.**", "bla"); //Assert - Checking Loginstatus.ErrorMessage. Assert.AreEqual(actual.errormessage, "Wrong password"); }
public AuthController(ILogger <UserController.UserController> logger, IJwtService jwtService, UserManager <User> userManager, ILoginHandler loginHandler, IRefreshTokenHandler refreshTokenHandler, ILogoutHandler logoutHandler) { _logger = logger; _jwtService = jwtService; _userManager = userManager; _loginHandler = loginHandler; _refreshTokenHandler = refreshTokenHandler; _logoutHandler = logoutHandler; }
public void LoginResearcherDB_Login_WithValidUser() { //Setup //Act - trying to log in uut = new LoginHandler(mockContext.Object); var actual = uut.LoginResearcherDB("*****@*****.**", "123456"); //Assert - Checking Loginstatus.IsSuccess. Assert.IsTrue(actual.success); }
public HomeView(BrowserInterop browserInterop, ILoginHandler loginHandler, IConnectApiHandler connMan) { InitializeComponent(); _loginHandler = loginHandler; WebControl.LifeSpanHandler = new LifeSpanHandler(); WebControl.RegisterJsObject("six_client", new Handler(browserInterop, connMan, HandleLogin)); this.WhenActivated(d => { d(this.WhenAnyValue(x => x.ViewModel).BindTo(this, v => v.DataContext)); d(this.WhenAnyValue(x => x.ViewModel) .Skip(1) .Subscribe(vm => { d(WebControl.WhenAnyValue(x => x.IsLoading).Subscribe(x => { ViewModel.ProgressState.Active = x; ViewModel.CanGoBack = WebControl.CanGoBack; ViewModel.CanGoForward = WebControl.CanGoForward; })); d(vm.Navigate.Subscribe(x => { switch (x) { case HomeViewModel.NavigateMode.GoBack: { WebControl.BackCommand.Execute(null); break; } case HomeViewModel.NavigateMode.Abort: { WebControl.Stop(); break; } case HomeViewModel.NavigateMode.GoForward: { WebControl.ForwardCommand.Execute(null); break; } case HomeViewModel.NavigateMode.Reload: { WebControl.Reload(false); break; } } })); })); d(this.WhenAnyValue(v => v.WebControl.IsLoading) .Skip(1) .Subscribe(x => ViewModel.IsNavigating = x)); }); CommandBindings.Add(new CommandBinding(BrowserView.CopyToClipboard, OnCopyToClipboard, CanCopyToClipboard)); CommandBindings.Add(new CommandBinding(BrowserView.OpenInSystemBrowser, OnOpenInSystemBrowser, CanOpenInSystemBrowser)); }
/// <summary> /// Keep history of current user.<br /> /// Clear transaction data. /// </summary> /// <returns></returns> public ActionResult Logout() { dsTransDataModel dsTrans = CommonUtil.dsTransData; if (dsTrans != null) { ILoginHandler handLogin = ServiceContainer.GetService <ILoginHandler>() as ILoginHandler; handLogin.KeepHistory(CommonUtil.dsTransData.dtUserData.EmpNo, LogType.C_LOG_OUT); CommonUtil.dsTransData = null; } return(Json(true)); }
public SettingsTabViewModel(VpnConnector vpnConnector, SettingsContainerViewModel settingsContainerViewModel, MyAccountViewModel myAccountViewModel, IMessageBoxService messageBoxService, EventFacade eventFacade, ILoginHandler loginHandler, IBrowser browser) { this._vpnConnector = vpnConnector; this._loginHandler = loginHandler; this._messageBoxService = messageBoxService; this._eventFacade = eventFacade; this._browser = browser; base.get_Items().AddRange(new Screen[] { settingsContainerViewModel, myAccountViewModel }); }
public RegisterProviderMiddleware(RequestDelegate next, IOptions <TokenProviderOptions> options, IAccountRepository accountRepository, IAuthInternalRepository internalRepository, ILogger <RegisterService> registerLogger, ILogger <AllegroRegisterHandler> allegroLogger, ApplicationDbContext context) { _next = next; _options = options.Value; _loginHandler = new AllegroRegisterHandler(allegroLogger); _registerService = new RegisterService(accountRepository, registerLogger, internalRepository, context); }
public AppStartupLoginHandler(ILoginHandler loginHandler, BlockedApiLoginHandler blockedApiLoginHandler, ServersUpdateTimer serversUpdateTimer, ServiceWatcher serviceWatcher, INotificationProvider notificationProvider, AutoConnectManager autoConnectManager, OpenVpnConfigsUpdateTimer openVpnConfigsUpdateTimer, VpnConnectionWatcher wcfServiceWatcher, SettingsServiceClientManager settingsServiceClientManager, FavouritesManager favouriteServersUpdater, CyberSecHostsStorage cyberSecHostsStorage) { this._serversUpdateTimer = serversUpdateTimer; this._serviceWatcher = serviceWatcher; this._notificationProvider = notificationProvider; this._autoConnectManager = autoConnectManager; this._openVpnConfigsUpdateTimer = openVpnConfigsUpdateTimer; this._wcfServiceWatcher = wcfServiceWatcher; this._settingsServiceClientManager = settingsServiceClientManager; this._favouriteServersUpdater = favouriteServersUpdater; this._loginHandler = loginHandler; this._blockedApiLoginHandler = blockedApiLoginHandler; this._cyberSecHostsStorage = cyberSecHostsStorage; }
private static bool HandleLogin(ILoginHandler loginHandler) { if (!loginHandler.CreateFirstUserIfNeeded()) { return(false); } if (!loginHandler.Login()) { return(false); } return(true); }
public AccountAppService( ILoginHandler loginHandler, LoginPresenter loginPresenter, IExchangeRefreshTokenHandler exchangeRefreshTokenHandler, ExchangeRefreshTokenPresenter exchangeRefreshTokenPresenter, IRegisterUserHandler registerUserHandler, IOptions <AuthSettings> authSettings) { _loginHandler = loginHandler; _loginPresenter = loginPresenter; _exchangeRefreshTokenHandler = exchangeRefreshTokenHandler; _exchangeRefreshTokenPresenter = exchangeRefreshTokenPresenter; _registerUserHandler = registerUserHandler; _authSettings = authSettings.Value; }
public Server(ILoginHandler loginHandler, ILogger <Server> logger, ISearchContestTasksHandler searchContestTasksHandler, IAddParticipantHandler addParticipantHandler, IAddEntryHandler addEntryHandler, ISearchParticipantsHandler searchParticipantHandler, ISearchParticipantsJoin searchParticipantJoinHandler) { m_loginHandler = loginHandler; m_logger = logger; m_searchContestTasksHandler = searchContestTasksHandler; m_addParticipantHandler = addParticipantHandler; m_addEntryHandler = addEntryHandler; m_searchParticipantHandler = searchParticipantHandler; m_searchParticipantJoinHandler = searchParticipantJoinHandler; var ipAddress = IPAddress.Parse(Address); m_tcpListener = new TcpListener(ipAddress, Port); m_tcpListener.Start(); }
public LoginMutation(ILoginHandler handler) { FieldAsync <LoginQueryType>( "sendLogin", arguments: new QueryArguments(new QueryArgument <NonNullGraphType <LoginCreateViewModel> > { Name = "request" }), resolve: async context => { var house = context.GetArgument <LoginRequest>("request"); return(await context.TryAsyncResolve(async _ => await handler.ProcessRequest(house))); } ); }
public SettingsTabViewModel(IVpnConnectionManager vpnConnectionManager, SettingsContainerViewModel settingsContainerViewModel, MyAccountViewModel myAccountViewModel, LogViewModel logViewModel, IMessageBoxService messageBoxService, EventFacade eventFacade, ILoginHandler loginHandler, IBrowser browser) { this._vpnConnectionManager = vpnConnectionManager; this._loginHandler = loginHandler; this._messageBoxService = messageBoxService; this._eventFacade = eventFacade; this._browser = browser; this.< Logout > k__BackingField = new RelayCommand(new Action(this.LogoutCommand)); this.< HelpCenter > k__BackingField = new RelayCommand(new Action(this.HelpCenterCommand)); base.get_Items().AddRange(new Screen[] { settingsContainerViewModel, myAccountViewModel, logViewModel }); }
public AuthController( ILoginHandler loginHandler, IRegistrationHandler registrationHandler ) { this.loginHandler = loginHandler; this.registrationHandler = registrationHandler; }