public RDCUserAccountsViewModel(ISnackbarMessageQueue snackbarMessageQueue, IUserAccountManager userAccountManager)
        {
            _snackbarMessageQueue = snackbarMessageQueue;
            _userAccountManager   = userAccountManager;

            Accounts = new ObservableCollection <UserAccount>(_userAccountManager.GetUserAccounts());
        }
Ejemplo n.º 2
0
 public AccountAppService(
     IUserEmailer userEmailer,
     IImpersonationManager impersonationManager,
     IUserLinkManager userLinkManager,
     ICaptchaValidator captchaValidator,
     IAppUrlService appUrlService,
     IPasswordHasher <User> passwordHasher,
     ITenantRegistrationAppService tenantRegistrationAppService,
     IVerificationCodeManager verificationCodeManager,
     IUserAccountManager userAccountManager,
     UserManager userManager,
     UserRegistrationManager userRegistrationManager)
 {
     _userEmailer                  = userEmailer;
     _userRegistrationManager      = userRegistrationManager;
     _impersonationManager         = impersonationManager;
     _userLinkManager              = userLinkManager;
     _appUrlService                = appUrlService;
     _captchaValidator             = captchaValidator;
     _passwordHasher               = passwordHasher;
     _tenantRegistrationAppService = tenantRegistrationAppService;
     _verificationCodeManager      = verificationCodeManager;
     _userManager                  = userManager;
     _userAccountManager           = userAccountManager;
 }
 public DashboardController(IUserSessionHelper userSessionHelper, IUserAccountManager userAccountManager, IIssueManager issueManager, IProjectManager projectManager, ITeamManager teamManager)
 {
     this.userSessionHelper  = userSessionHelper;
     this.userAccountManager = userAccountManager;
     this.issueManager       = issueManager;
     this.projectManager     = projectManager;
     this.teamManager        = teamManager;
 }
Ejemplo n.º 4
0
 public HomeController(IUserAccountManager userAccountManager, IClientManager clientManager, ICashAccountManager cashAccountManager,
                       ITransferTransactionManager transferTransactionManager)
 {
     UserAccountManager         = userAccountManager;
     ClientManager              = clientManager;
     CashAccountManager         = cashAccountManager;
     TransferTransactionManager = transferTransactionManager;
 }
 public static bool TryGetUserAccountManager(this PanaceaServices core, out IUserAccountManager manager)
 {
     manager = core.PluginLoader
               .GetPlugins <IUserAccountPlugin>()
               .FirstOrDefault()
               ?.GetUserAccountManager();
     return(manager != null);
 }
 public AccountManagementController(
     IIdentityManager identityManager
     , IUserAccountManager userAccountManager
     , ApplicationUserManager applicationUserManager)
 {
     _identityManager        = identityManager;
     _userAccountManager     = userAccountManager;
     _applicationUserManager = applicationUserManager;
 }
 public HomeController(IUserAuthHelper userSessionHelper, IUserAccountManager userAccountManager,
                       IOptions <AppSettings> settings, IHostingEnvironment env) : base(settings)
 {
     this._userSessionHelper  = userSessionHelper;
     this._userAccountManager = userAccountManager;
     tc = new TelemetryClient()
     {
         InstrumentationKey = settings.Value.ApplicationInsights.InstrumentationKey
     };
     this._env = env;
 }
Ejemplo n.º 8
0
 public AccountController(
     IUserAccountManager userAccountManager,
     IPasswordService passwordService,
     ISecurityService securityService,
     IClientAppRepo clientAppRepo)
 {
     _userAccountManager = userAccountManager;
     _passwordService    = passwordService;
     _securityService    = securityService;
     _clientAppRepo      = clientAppRepo;
 }
Ejemplo n.º 9
0
        public RDCSessionViewModel(IEventAggregator events, ISnackbarMessageQueue snackbarMessageQueue, IRDCInstanceManager rdcInstanceManager, IUserAccountManager userAccountManager,
                                   IRDCGroupManager rdcGroupManager)
        {
            _events = events;
            _events.Subscribe(this);

            _snackbarMessageQueue = snackbarMessageQueue;
            _rdcInstanceManager   = rdcInstanceManager;
            _userAccountManager   = userAccountManager;
            _rdcGroupManager      = rdcGroupManager;
        }
 public AccountController(
     IUserAccountManager userAccountManager,
     IPasswordService passwordService,
     IClientAppRepo clientAppRepo,
     IHttpContextAccessor httpContextAccessor
     )
 {
     _userAccountManager  = userAccountManager;
     _passwordService     = passwordService;
     _clientAppRepo       = clientAppRepo;
     _httpContextAccessor = httpContextAccessor;
 }
Ejemplo n.º 11
0
 public MyAccountViewModel(PanaceaServices core, IUserAccountManager manager)
 {
     _core          = core;
     SignoutCommand = new RelayCommand(async arg =>
     {
         if (_core.TryGetUiManager(out IUiManager ui))
         {
             ui.GoHome();
         }
         await manager.LogoutAsync();
     });
     BuyServiceCommand = new RelayCommand(arg =>
     {
         if (_core.TryGetBilling(out IBillingManager billing))
         {
             billing.NavigateToBuyServiceWizard();
         }
     });
     ChangeInfoCommand = new RelayCommand(arg =>
     {
         if (_core.TryGetUiManager(out IUiManager ui))
         {
             ui.Navigate(new UpdateAccountViewModel(_core));
         }
         else
         {
             _core.Logger.Error(this, "ui manager not loaded");
         }
     });
     ChangeCredentialsCommand = new RelayCommand(arg =>
     {
         if (_core.TryGetUiManager(out IUiManager ui))
         {
             ui.Navigate(new UpdateCredentialsViewModel(_core));
         }
         else
         {
             _core.Logger.Error(this, "ui manager not loaded");
         }
     });
     ResetPasswordCommand = new RelayCommand(async arg =>
     {
         if (_core.TryGetUiManager(out IUiManager ui))
         {
             await ui.ShowPopup <object>(new PasswordResetViewModel(_core));
         }
         else
         {
             _core.Logger.Error(this, "ui manager not loaded");
         }
     });
 }
Ejemplo n.º 12
0
 public AccountController(
     ApplicationUserManager applicationUserManager
     , ApplicationSignInManager signInManager
     , IUserAccountManager userAccountManager
     , IAuthenticationManager authenticationManager
     , IApplicationManager applicationManager
     )
 {
     _applicationUserManager = applicationUserManager;
     _signInManager          = signInManager;
     _userAccountManager     = userAccountManager;
     _authenticationManager  = authenticationManager;
     _applicationManager     = applicationManager;
 }
Ejemplo n.º 13
0
 public NavigationButtonViewModel(IUserService service, IUserAccountManager manager)
 {
     _service     = service;
     ClickCommand = new RelayCommand(async args =>
     {
         if (_service.User.Id == null)
         {
             await manager.LoginAsync();
         }
         else
         {
             manager.NavigateToMyAccount();
         }
     });
 }
Ejemplo n.º 14
0
 public RegisterViewModel(IUserAccountManager manager, PanaceaServices core, TaskCompletionSource <bool> source)
 {
     _core        = core;
     _source      = source;
     LoginCommand = new RelayCommand(async arg =>
     {
         _waitingForAnotherTask = true;
         var res = await manager.LoginAsync();
         _waitingForAnotherTask = false;
         source.TrySetResult(res);
     });
     RegisterCommand = new AsyncCommand(async arg =>
     {
         await RegisterAsync();
     });
 }
Ejemplo n.º 15
0
        public RequestSignInViewModel(IUserAccountManager manager, TaskCompletionSource <bool> source, string text)
        {
            _source = source;
            Text    = text;
            CreateAccountCommand = new RelayCommand(async args =>
            {
                taskCompletionSource.SetResult(true);
                source.SetResult(await manager.RegisterAsync());
            });

            SignInCommand = new RelayCommand(async args =>
            {
                taskCompletionSource.SetResult(true);
                source.SetResult(await manager.LoginAsync());
            });
        }
Ejemplo n.º 16
0
 public ProfileAppService(
     IAppFolders appFolders,
     IBinaryObjectManager binaryObjectManager,
     ITimeZoneService timezoneService,
     IPictureManager pictureManager,
     IVerificationCodeManager verificationCodeManager,
     IUserAccountManager userAccountManager,
     IAccountCache accountCache,
     UserManager userManager)
 {
     _appFolders              = appFolders;
     _binaryObjectManager     = binaryObjectManager;
     _timeZoneService         = timezoneService;
     _pictureManager          = pictureManager;
     _verificationCodeManager = verificationCodeManager;
     _userAccountManager      = userAccountManager;
     _accountCache            = accountCache;
     _userManager             = userManager;
 }
Ejemplo n.º 17
0
 public AccountController(IUserAccountManager userAccountManager, IUserAuthHelper userSessionHelper, ITeamManager teamManager)
 {
     this._userAccountManager = userAccountManager;
     this._userSessionHelper = userSessionHelper;
     this._teamManager = teamManager;
 }
 public DefaultScimUserManager(IUserAccountManager<UserAccount> userAccountManager, IFilterBinder filterBinder, IAttributeNameMapper mapper)
 {
     this.userAccountManager = userAccountManager;
     this.filterBinder = filterBinder;
     this.mapper = mapper;
 }
 public MenuHeaderViewComponent(IUserAuthHelper userSessionHelper, IUserAccountManager userAccountManager)
 {
     this.userSessionHelper = userSessionHelper;
     this.userAccountManager = userAccountManager;
 }
Ejemplo n.º 20
0
 public UserController(IUserAccountManager manager, IConfiguration config)
 {
     this.config  = config;
     this.manager = manager;
 }
Ejemplo n.º 21
0
 public SettingsController(IUserAccountManager userAccountManager)
 {
     this._userAccountManager = userAccountManager;
 }
Ejemplo n.º 22
0
 public AccountController(IUserAccountManager userAccountManager, IUserAuthHelper userSessionHelper, ITeamManager teamManager)
 {
     this.userAccountManager = userAccountManager;
     this.userSessionHelper  = userSessionHelper;
     this.teamManager        = teamManager;
 }
Ejemplo n.º 23
0
 public UserAccountController(IUserAccountManager userAccountManager)
 {
     UserAccountManager = userAccountManager;
 }
Ejemplo n.º 24
0
 public IPNController(IUserPaymentService userPaymentService, IUserAccountManager userAccountManager)
 {
     _userPaymentService = userPaymentService;
     _userAccountManager = userAccountManager;
 }
 public AccountController(IRepositary repositary, IUserAccountManager accountManager) : base(repositary)
 {
     this.accountManager = accountManager;
 }
 public AccountController(IUserAccountManager accountManager)
 {
     this.accountManager = accountManager;
 }
 public SettingsController(IUserAccountManager userAccountManager)
 {
     this.userAccountManager = userAccountManager;
 }
 public void Init()
 {
     userAccountRepositoryMock = new Mock <IUserAccountRepository>();
     userAccountManager        = new UserAccountManager(userAccountRepositoryMock.Object);
 }
 public DefaultScimUserManager(IUserAccountManager <UserAccount> userAccountManager, IFilterBinder filterBinder, IAttributeNameMapper mapper)
 {
     this.userAccountManager = userAccountManager;
     this.filterBinder       = filterBinder;
     this.mapper             = mapper;
 }
 public InsightsController(ITeamManager teamManager, IUserAccountManager userAccountManager, IIssueManager issueManager)
 {
     _teamManager        = teamManager;
     _userAccountManager = userAccountManager;
     _issueManager       = issueManager;
 }
 public AccountController(IRepositary repositary, IUserAccountManager accountManager) : base(repositary)
 {
     this.accountManager = accountManager;
 }
Ejemplo n.º 32
0
 public AccountController()
 {
     manager = new UserAccountManager();
 }
Ejemplo n.º 33
0
        public LoginViewModel(IUserAccountManager manager, PanaceaServices core, TaskCompletionSource <bool> source)
        {
            _core   = core;
            _source = source;
            if (Debugger.IsAttached)
            {
                Email = "*****@*****.**";
            }
            ForgotPasswordCommand = new RelayCommand(async arg =>
            {
                if (_core.TryGetUiManager(out IUiManager ui))
                {
                    var src = new TaskCompletionSource <bool>();
                    var forgotPassViewModel = new ForgotPasswordViewModel(_core, src);
                    _watingForAnotherTask   = true;
                    ui.Navigate(forgotPassViewModel);
                    var res = await src.Task;
                    if (_core.TryGetUiManager(out IUiManager ui2))
                    {
                        ui2.GoHome();
                    }
                    source.SetResult(res);
                }
                else
                {
                    _core.Logger.Error(this, "ui manager not loaded");
                }
            });
            RegisterCommand = new RelayCommand(async arg =>
            {
                _watingForAnotherTask = true;
                source.SetResult(await manager.RegisterAsync());
            });
            LoginWithDateCommand = new AsyncCommand(async arg =>
            {
                try
                {
                    var password = (arg as PasswordBox).Password;
                    if (string.IsNullOrEmpty(Date.ToString()))
                    {
                        ShowWarning("Please provide a date of birth");
                        return;
                    }
                    if (string.IsNullOrEmpty(password))
                    {
                        ShowWarning("Please provide a password");
                        return;
                    }
                    if (await DoWhileBusy(() => core.UserService.LoginAsync(Date.Value, password)))
                    {
                        if (_core.TryGetUiManager(out IUiManager ui))
                        {
                            ui.GoHome();
                        }
                        source?.SetResult(true);
                        return;
                    }
                    else
                    {
                        ShowWarning("Incorrect credentials");
                        return;
                    }
                }
                catch
                {
                }
                finally
                {
                }
            });
            LoginWithEmailCommand = new AsyncCommand(async arg =>
            {
                var password = (arg as PasswordBox).Password;

                if (string.IsNullOrEmpty(Email))
                {
                    ShowWarning("Please provide an email");
                    return;
                }

                if (!Regex.IsMatch(Email,
                                   @"\A(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)\Z",
                                   RegexOptions.IgnoreCase))
                {
                    ShowWarning("Please provide a valid email");
                    return;
                }

                if (string.IsNullOrEmpty(password))
                {
                    ShowWarning("Please provide a password");
                    return;
                }

                if (await DoWhileBusy(() => core.UserService.LoginAsync(Email, password)))
                {
                    if (_core.TryGetUiManager(out IUiManager ui))
                    {
                        ui.GoHome();
                    }
                    source?.SetResult(true);
                    return;
                }
                else
                {
                    ShowWarning("Incorrect credentials", PopupType.Error);
                    return;
                }
            });
        }
 public void Init() => userAccountManager = new UserAccountManager(new UserAccountRepositoryMock());
 public AccountController(IUserAccountManager accountManager)
 {
     this.accountManager = accountManager;
 }
 public AccountController(IUserAccountManager userAccountManager, IUserSessionHelper userSessionHelper)
 {
     this.userAccountManager = userAccountManager;
     this.userSessionHelper  = userSessionHelper;
 }
Ejemplo n.º 37
0
 public HomeController(IUserAuthHelper userSessionHelper,IUserAccountManager userAccountManager)
 {
     this._userSessionHelper = userSessionHelper;
     this._userAccountManager = userAccountManager;
 }