public AccountController(ApplicationContext db, ILoginQuery loginQuery, IRegisterCommand registerCommand, IForgetPasswordCommand forgetPasswordCommand, IActiveAccountCommand activeAccountCommand, IUpdateProfileCommand updateProfileCommand, IChangePasswordCommand changePasswordCommand, IGetNewPasswordCommand getNewPasswordCommand)
 {
     this.db                    = db;
     this.loginQuery            = loginQuery;
     this.registerCommand       = registerCommand;
     this.forgetPasswordCommand = forgetPasswordCommand;
     this.activeAccountCommand  = activeAccountCommand;
     this.updateProfileCommand  = updateProfileCommand;
     this.changePasswordCommand = changePasswordCommand;
     this.getNewPasswordCommand = getNewPasswordCommand;
 }
Example #2
0
        public LoginViewModel(IRegionManager regionManager, IDialogCoordinator dialogCoordinator, ILoginQuery loginQuery,
                              SessionData sessionData)
        {
            this.regionManager     = regionManager;
            this.dialogCoordinator = dialogCoordinator;
            this.loginQuery        = loginQuery;
            this.sessionData       = sessionData;

            LoginCommand = new DelegateCommand(LoginToRPDAsync, CanLogin)
                           .ObservesProperty(() => User.Id)
                           .ObservesProperty(() => User.Password);

            ResetPwdCommand = new DelegateCommand(ResetPwd);
        }
Example #3
0
        public LoginQueryTests()
        {
            _random = new Random();
            _uow    = new Mock <IUnitOfWork>();

            _userList = new List <User>();
            _uow.Setup(x => x.Query <User>()).Returns(() => _userList.AsQueryable());

            _tokenBuilder = new Mock <ITokenBuilder>(MockBehavior.Strict);
            _userQuery    = new Mock <IUsersQuery>();

            _context = new Mock <ISecurityContext>(MockBehavior.Strict);

            _query = new LoginQuery(_uow.Object, _tokenBuilder.Object, _userQuery.Object, _context.Object);
        }
Example #4
0
 public LoginController(ILoginQuery query, IAutoMapper mapper)
 {
     _query  = query;
     _mapper = mapper;
 }
 public LoginRepository(IConfiguration configuration, ILoginQuery loginQuery) : base(configuration, loginQuery)
 {
     _loginQuery = loginQuery;
 }