public void Initialize (ILoginService service, IConfigSource config, IRegistryCore registry) { IConfig loginServerConfig = config.Configs ["LoginService"]; if (loginServerConfig != null) { m_UseTOS = loginServerConfig.GetBoolean ("UseTermsOfServiceOnFirstLogin", false); m_TOSLocation = loginServerConfig.GetString ("FileNameOfTOS", ""); if (m_TOSLocation.Length > 0) { // html appears to be broken if (m_TOSLocation.ToLower ().StartsWith ("http://", StringComparison.Ordinal)) m_TOSLocation = m_TOSLocation.Replace ("ServersHostname", MainServer.Instance.HostName); else { var simBase = registry.RequestModuleInterface<ISimulationBase> (); var TOSFileName = PathHelpers.VerifyReadFile (m_TOSLocation, ".txt", simBase.DefaultDataPath); if (TOSFileName == "") { m_UseTOS = false; MainConsole.Instance.ErrorFormat ("Unable to locate the Terms of Service file : '{0}'", m_TOSLocation); MainConsole.Instance.Error (" Show 'Terms of Service' for a new user login is disabled!"); } else m_TOSLocation = TOSFileName; } } else m_UseTOS = false; } m_AuthenticationService = registry.RequestModuleInterface<IAuthenticationService> (); m_LoginService = service; }
public OAuthTokenLoginViewModel( ILoginService loginFactory, IAccountsRepository accountsRepository, IAlertDialogFactory alertDialogFactory) { Title = "Login"; var canLogin = this.WhenAnyValue(y => y.Token, (x) => !string.IsNullOrEmpty(x)); LoginCommand = ReactiveCommand.CreateAsyncTask(canLogin, async _ => { try { using (alertDialogFactory.Activate("Logging in...")) { var account = await loginFactory.Authenticate(ApiDomain, WebDomain, Token, false); await accountsRepository.SetDefault(account); return account; } } catch (UnauthorizedException) { throw new Exception("The provided token is invalid! Please try again or " + "create a new token as this one might have been revoked."); } }); LoginCommand.Subscribe(x => MessageBus.Current.SendMessage(new LogoutMessage())); }
public HomeController(IHomeDataService homeDataService, ILoginService loginService, IUsersService usersService, IActivitiesService activitiesService) { _homeDataService = homeDataService; _loginService = loginService; _usersService = usersService; _activitiesService = activitiesService; }
public BCProxyLoginController(IPortalUserFacade portalUserFacade, ILoginService loginService, IFormsAuthenticationService formsAuthenticationService, IPortletTemplateFacade portletTemplateFacade) { _loginService = loginService; _formsAuthenticationService = formsAuthenticationService; _portletTemplateFacade = portletTemplateFacade; _portalUserFacade = portalUserFacade; }
public LoginViewModel(IMessenger messenger, ILoginService loginService) { _messenger = messenger; _loginService = loginService; LoginCommand = new RelayCommand<object>(Login); }
/// <summary> /// Initializes a new instance of the <see cref="AccountController"/> class. /// </summary> /// <param name="logger">Logger Service</param> /// <param name="loginService">Login Service</param> /// <param name="userService">User Service</param> /// <param name="passwordService">Password Service</param> public AccountController( ILoggerService logger, ILoginService loginService, IUserService userService, IPasswordService passwordService) : base(logger) { if (loginService == null) { throw new ArgumentNullException("ILoginService, LoginController"); } if (userService == null) { throw new ArgumentNullException("IUserService, LoginController"); } if(passwordService == null) { throw new ArgumentNullException("IPasswordService, LoginController"); } this._loginService = loginService; this._userService = userService; this._passwordService = passwordService; }
protected override void OnCreate (Bundle bundle) { AppSettings.TrackingId = "UA-65892866-1"; AppSettings.RegisterTypes (); Logger.Instance = new AndroidLogger (); Mvx.RegisterType<IToastService, ToastService> (); Mvx.RegisterType<IAnalyticsService, AnalyticsService> (); base.OnCreate (bundle); SetContentView (Resource.Layout.Main); _apiService = Mvx.Resolve<IApiService> (); _toastService = Mvx.Resolve<IToastService> (); _loginService = Mvx.Resolve<ILoginService> (); IsLoading = true; CheckUserExists (); Button button = FindViewById<Button> (Resource.Id.button_register); button.Click += ClickHandler; AppLocation.Current.LocationServiceConnected += (object sender, ServiceConnectedEventArgs e) => { }; AppLocation.StartLocationService (); }
public UsersController(IUsersService usersService, IUserAuthentication authentication, ILoginService loginService) : base(authentication, loginService) { this.usersService = usersService; }
public Form1() { InitializeComponent(); _loginService = new LoginService(UsersData.LoginInfo); _presenter = new LoginPresenter(this,_loginService); }
public StreamController( IUserAuthentication authentication, ILoginService loginService, IRssSubscriptionService rssSubscriptionService) : base(authentication, loginService) { this.rssSubscriptionService = rssSubscriptionService; }
public UsersController(IUsersService usersService, IUserAuthentication authentication, ILoginService loginService, ISessionProvider sessionProvider) : base(authentication, loginService, sessionProvider) { this.usersService = usersService; }
public OrderPlacedService(IUserService userService, ILoginService loginService, ISession session, IRegistrationService registrationService) { _userService = userService; _loginService = loginService; _session = session; _registrationService = registrationService; }
/// <summary> /// Initializes a new instance of the <see cref="UserController"/> class. /// </summary> /// <param name="loginService">The login service.</param> /// <param name="userService">The user service.</param> /// <param name="emailService">The email service.</param> public UserController(ILoginService loginService, ISubscriberService subscriberService, IUserService userService, IEmailService emailService) { _loginService = loginService; _userService = userService; _emailService = emailService; _subscriberService = subscriberService; }
public OpmlImporterController( IUserAuthentication authentication, ILoginService loginService, IOpmlImporterService opmlImporterService) : base(authentication, loginService) { this.opmlImporterService = opmlImporterService; }
public AccountController( IUserAuthentication authentication, ILoginService loginService, IAccountService accountService) : base(authentication, loginService) { this.accountService = accountService; }
public AngelCourseService(IEventAggregator eventAggregator, ILoginService loginService) { this.eventAggregator = eventAggregator; this.loginService = loginService; eventAggregator.GetEvent<LoginStatusChangedEvent>().Subscribe(GetCoursesForUser, ThreadOption.UIThread); eventAggregator.GetEvent<ActiveCourseChangedEvent>().Subscribe(LoadCourse, ThreadOption.UIThread); }
public MainWindowViewModel( ILoginService loginService, IBitBucketClient bitBucketClient, IUserService userService) { this.loginService = loginService; this.bitBucketClient = bitBucketClient; this.userService = userService; }
public HomeController( IUserAuthentication authentication, ILoginService loginService, ISessionProvider sessionProvider, IRssChannelsRepository rssRepository) : base(authentication, loginService, sessionProvider) { this.rssRepository = rssRepository; }
public AdminLoginModule(ILoginService loginService, IDocumentStore store) : base("/admin") { this.RequiresInstallerDisabled(() => store.OpenSession()); this.RequiresHttpsOrXProto(); Get["/login"] = parameters => { using (IDocumentSession session = store.OpenSession()) { SiteSettings site = session.GetSiteSettings(); if (site == null) { site = new SiteSettings { Title = "Admin", SubTitle = "Go to Site -> Settings" }; } return View["admin/login", new { site.Title, SubTitle = "Login" }]; } }; Get["/logout"] = parameters => { // Called when the user clicks the sign out button in the application. Should // perform one of the Logout actions (see below) return View["admin/logout"]; }; Post["/login"] = parameters => { // Called when the user submits the contents of the login form. Should // validate the user based on the posted form data, and perform one of the // Login actions (see below) var loginParameters = this.Bind<LoginParameters>(); User user; if (!loginService.Login(loginParameters.UserName, loginParameters.Password, out user)) { return global::System.Net.HttpStatusCode.Unauthorized; } return this.LoginAndRedirect( user.Identifier, fallbackRedirectUrl: "/admin", cookieExpiry: DateTime.Now.AddHours(1)); }; }
public LoginViewModel(ILoginService loginService, IDialogService dialogService) { _loginService = loginService; _dialogService = dialogService; Username = "******"; Password = "******"; IsLoading = false; }
public AdminController( IUserAuthentication authentication, ILoginService loginService, IAdminService adminService, IUpdateService updateService) : base(authentication, loginService) { this.adminService = adminService; this.updateService = updateService; }
public IRoute Submit(ILoginService service, RequestViewModel request) { var success = service.Login(request.UserName, request.Password); if (success) return new Route("success", "login"); return new Route("failure", "login") .AddError("login failed"); }
public LLLoginServiceInConnector(IConfigSource config, IHttpServer server, string configName) : base(config, server, configName) { string loginService = ReadLocalServiceFromConfig(config); Object[] args = new Object[] { config }; m_LoginService = ServerUtils.LoadPlugin<ILoginService>(loginService, args); InitializeHandlers(server); }
public LoginController( ILoginService LoginService, IUserIdentityRepository UserIdentityRepository ) { if ( LoginService == null ) { throw new ArgumentNullException( "LoginService" ); } if ( UserIdentityRepository == null ) { throw new ArgumentNullException( "UserIdentityRepository" ); } this.loginService = LoginService; this.userIdentityRepository = UserIdentityRepository; }
public PassportControllerTest() { this._loginService = Substitute.For<ILoginService>(); this._usersManageService = Substitute.For<IUsersManageService>(); this._controller = new PassportController { LoginService = this._loginService, UserService = _usersManageService }; this._controller.SetMockControllerContext(); }
public UserInitializeService( IUserRepository UserRepository, ILoginService LoginService ) { if ( UserRepository == null ) { throw new ArgumentNullException( "UserRepository" ); } if ( LoginService == null ) { throw new ArgumentNullException( "LoginService" ); } this.userRepository = UserRepository; this.loginService = LoginService; }
public LoginPageViewModel(ILoader loader, IProgressService progressService, INavigationService navigationService, ILoginService loginService, IEventAggregator eventAggregator) : base(loader, progressService, navigationService) { Loader.LoadingChanged += (sender, args) => LoginCommand.RaiseCanExecuteChanged(); _loginService = loginService; _eventAggregator = eventAggregator; }
public void Initialize(ILoginService service, IConfigSource config, IRegistryCore registry) { IConfig loginServerConfig = config.Configs["LoginService"]; if (loginServerConfig != null) { m_UseTOS = loginServerConfig.GetBoolean("UseTermsOfServiceOnFirstLogin", false); m_TOSLocation = loginServerConfig.GetString("FileNameOfTOS", ""); } m_AuthenticationService = registry.RequestModuleInterface<IAuthenticationService>(); m_LoginService = service; }
//private readonly ISystemParametersAdapter _systemParameters; public AdministrationService(IServerConfiguration serviceConfiguration, ILoginService loginService, IPresentationWorker worker) { Debug.Assert(serviceConfiguration != null, "IServerConfiguration не может быть null"); Debug.Assert(loginService != null, "ILoginService не может быть null"); Debug.Assert(worker != null, "IPresentationWorker не может быть null"); _serviceConfiguration = serviceConfiguration; _loginService = loginService; _worker = worker; //_systemParameters = new SystemParametersAdapter(); }
public void When_building_a_login_model() { var settings = S<IApplicationSettings>(); settings.Stub(x => x.JanrainAppName()).Return(appname); var url = S<IUrlResolver>(); url.Stub(x => x.AbsoluteAction(Arg.Is("ProcessLogin"), Arg.Is("Account"), Arg<object>.Matches(Property.Value("returnUrl", "http://www.google.com")))) .Return(absoluteUrl); login = new LoginService(settings, url, null); loginModel = login.Build("http://www.google.com"); }
public LoginController(ILoginService loginService) { this.loginService = loginService; }
public LoginsController(ILoginService loginService) { _loginService = loginService; }
public AppInitializer(ILoginService loginService) { _loginService = loginService; }
public LoginController(ILoginService loginService, IUnitOfWork unitOfWork, ILog log) { this._loginService = loginService; this._unitOfWork = unitOfWork; this._log = log; }
public ShellViewModel(IScreen screen, ISettingService settingServices, ILoginService loginService, IDialogCoordinator coordinator, SettingViewModel settingViewModel, LoginViewModel loginViewModel, MainViewModel mainViewModel) { this.SettingService = settingServices; this.LoginService = loginService; this.Router = screen.Router; this.SettingViewModel = settingViewModel; this.LoginViewModel = loginViewModel; this.MainViewModel = mainViewModel; //Router.NavigationStack.Add(this.SettingViewModel); //Router.NavigationStack.Add(this.LoginViewModel); //Router.NavigationStack.Add(this.MainViewModel); if (!this.SettingService.HasSettings()) { this.Router.Navigate.Execute(this.SettingViewModel); } else if (!this.SettingService.HasToken()) { this.Router.Navigate.Execute(this.LoginViewModel); } else { this.Router.Navigate.Execute(this.MainViewModel); } this.SettingViewModel.SaveSetting .ObserveOn(RxApp.MainThreadScheduler) .Subscribe( async o => { var loginRequired = await loginService.IsLoginRequired(); if (o && loginRequired) { this.Router.Navigate.Execute(this.LoginViewModel); } else { this.Router.Navigate.Execute(this.MainViewModel); } }); this.LoginViewModel.LoginCommand.Subscribe( async tuple => { if (tuple.Item1) { await this.Router.Navigate.Execute(this.MainViewModel); } else { await coordinator.ShowMessageAsync( this, "Hata!", "Maalesef oturum açılamadı. Detaylı bilgi için kurulum klasörü içinde yer alan log.txt dosyasına bakabilirsiz."); } }); }
public LoginController(Context context, ILoginService loginService) { this.context = context; this.loginService = loginService; }
public LoginController() { _login = new LoginService(); }
public LoginController(ILoginService repository) { _service = repository; }
public LoginController(ILoginService loginService, IConfiguration config) { _loginService = loginService; _config = config; }
public Login_UI(ILoginService service) : this() { _service = service; }
public AppNavigation(INavigationService navi, IPageFactory pages, ILoginService login) { _navi = navi; _pages = pages; _login = login; }
private void InitData() { ModelState = new ModelStateDictionary(); _service = DataFactory.getLoginService(this.ModelState, Information.PersistanceStrategy); }
public HappeningService(HappeningsContext hc, ILoginService loginServ, IInvitationEntityService invitationService, IApiEntityService <User, UserDto> userServ) : base(hc, loginServ) { joinService = invitationService; userService = userServ; }
public override void InitController(OperationContext context) { base.InitController(context); _loginService = Context.App.GetService <ILoginService>(); _processService = Context.App.GetService <ILoginProcessService>(); }
public LoginViewModel(ILoginService loginService) { LoginData = new LoginData(); LoginCommand = new LoginCommand(loginService); }
public UploadFileCommand(BucketContentViewModel senderView, IObjectService objectService, IBucketService bucketService, ILoginService loginService) { _senderView = senderView; _objectService = objectService; _bucketService = bucketService; _loginService = loginService; }
public UserHomeController(IProductService ProductService, IMemberService MemberService, ILikeService LikeService, IDislikeService DislikeService, IProductReviewService ProductReviewService, ICartService CartService, ICouponService CouponService, IAddressService AddressService, IInvoiceService InvoiceService, ILoginService LoginService, IReportService ReportService, IUserFavoriteService UserFavoriteService, IOrderService OrderService) { _ProductService = ProductService; _MemberService = MemberService; _LikeService = LikeService; _DislikeService = DislikeService; _ProductReviewService = ProductReviewService; _CartService = CartService; _CouponService = CouponService; _AddressService = AddressService; _InvoiceService = InvoiceService; _LoginService = LoginService; _ReportService = ReportService; _UserFavoriteService = UserFavoriteService; _OrderService = OrderService; }
public LoginViewModel(INavigationService serviceNavigation, ILoginService loginService) { _loginService = loginService; _serviceNavigation = serviceNavigation; }
public LoginController(ILoginService loginService, ILogger logger) { _loginService = loginService; _logger = logger; }
public RenovadorToken(ILoginService loginService) { this.loginService = loginService; }
public LLLoginHandlers(ILoginService service, bool hasProxy) { m_LocalService = service; m_Proxy = hasProxy; }
public AppStart(IMvxApplication app, IMvxNavigationService mvxNavigationService) : base(app, mvxNavigationService) { _loginService = Mvx.IoCProvider.Resolve <ILoginService>(); }
public SettingsViewModel(ISettingsView view, IShellService shellService, ICrawlerService crawlerService, IManagerService managerService, ILoginService loginService, IFolderBrowserDialog folderBrowserDialog, IFileDialogService fileDialogService, ExportFactory <AuthenticateViewModel> authenticateViewModelFactory) : base(view) { _folderBrowserDialog = folderBrowserDialog; _fileDialogService = fileDialogService; ShellService = shellService; _settings = ShellService.Settings; CrawlerService = crawlerService; ManagerService = managerService; LoginService = loginService; _authenticateViewModelFactory = authenticateViewModelFactory; _browseDownloadLocationCommand = new DelegateCommand(BrowseDownloadLocation); _browseExportLocationCommand = new DelegateCommand(BrowseExportLocation); _authenticateCommand = new DelegateCommand(Authenticate); _tumblrLoginCommand = new AsyncDelegateCommand(TumblrLogin); _tumblrLogoutCommand = new AsyncDelegateCommand(TumblrLogout); _tumblrSubmitTfaCommand = new AsyncDelegateCommand(TumblrSubmitTfa); _saveCommand = new AsyncDelegateCommand(Save); _enableAutoDownloadCommand = new DelegateCommand(EnableAutoDownload); _exportCommand = new DelegateCommand(ExportBlogs); _bloglistExportFileType = new FileType(Resources.Textfile, SupportedFileTypes.BloglistExportFileType); Task loadSettingsTask = Load(); view.Closed += ViewClosed; }
public void Initalize() { _config = new TestHelper().Configuration; _loginService = new LoginService(_config); }
public LoginController(ITokenService tokenService, ILoginService loginService) { _tokenService = tokenService; _loginService = loginService; }
public LoginViewModel(ILoginService loginService) { _loginService = loginService; }
public LoginController(ILoginService service) { _loginService = service; }
public override void ViewDidLoad() { _loginService = Resolver.Resolve <ILoginService>(); _connectivity = Resolver.Resolve <IConnectivity>(); _folderService = Resolver.Resolve <IFolderService>(); _googleAnalyticsService = Resolver.Resolve <IGoogleAnalyticsService>(); NavItem.Title = AppResources.AddLogin; CancelBarButton.Title = AppResources.Cancel; SaveBarButton.Title = AppResources.Save; View.BackgroundColor = new UIColor(red: 0.94f, green: 0.94f, blue: 0.96f, alpha: 1.0f); NameCell.TextField.Text = Context?.Uri?.Host ?? string.Empty; NameCell.TextField.ReturnKeyType = UIReturnKeyType.Next; NameCell.TextField.ShouldReturn += (UITextField tf) => { UriCell.TextField.BecomeFirstResponder(); return(true); }; UriCell.TextField.Text = Context?.UrlString ?? string.Empty; UriCell.TextField.KeyboardType = UIKeyboardType.Url; UriCell.TextField.ReturnKeyType = UIReturnKeyType.Next; UriCell.TextField.ShouldReturn += (UITextField tf) => { UsernameCell.TextField.BecomeFirstResponder(); return(true); }; UsernameCell.TextField.AutocapitalizationType = UITextAutocapitalizationType.None; UsernameCell.TextField.AutocorrectionType = UITextAutocorrectionType.No; UsernameCell.TextField.SpellCheckingType = UITextSpellCheckingType.No; UsernameCell.TextField.ReturnKeyType = UIReturnKeyType.Next; UsernameCell.TextField.ShouldReturn += (UITextField tf) => { PasswordCell.TextField.BecomeFirstResponder(); return(true); }; PasswordCell.TextField.SecureTextEntry = true; PasswordCell.TextField.ReturnKeyType = UIReturnKeyType.Next; PasswordCell.TextField.ShouldReturn += (UITextField tf) => { NotesCell.TextView.BecomeFirstResponder(); return(true); }; GeneratePasswordCell.TextLabel.Text = AppResources.GeneratePassword; GeneratePasswordCell.Accessory = UITableViewCellAccessory.DisclosureIndicator; _folders = _folderService.GetAllAsync().GetAwaiter().GetResult(); var folderNames = _folders.Select(s => s.Name.Decrypt()).OrderBy(s => s).ToList(); folderNames.Insert(0, AppResources.FolderNone); FolderCell.Items = folderNames; TableView.RowHeight = UITableView.AutomaticDimension; TableView.EstimatedRowHeight = 70; TableView.Source = new TableSource(this); TableView.AllowsSelection = true; base.ViewDidLoad(); }
public LogoutController(ILoginService service) { _service = service; }
public BaseController(ILoginService loginService, ISecurityService securityService) { _loginServiceBase = loginService; _securityServiceBase = securityService; }