예제 #1
0
 public DashboardController()
 {
     _dashboard = new Dashboard {
         LoginRequest = new LoginRequest()
     };
     _accountProfileService = new AccountProfileService();
 }
 public ExternalAuthenticationController(
     IAccountService accountService,
     IAccountProfileService accountProfileService)
 {
     _accountService        = accountService;
     _accountProfileService = accountProfileService;
 }
예제 #3
0
        /// <summary>
        /// Secure module that handles requests to save a users profile
        /// The services are provided provided by IOC container (see the bootstrapper)
        /// </summary>
        /// <param name="accountService"></param>
        /// <param name="accountProfileService"></param>
        public ProfileModule(IAccountService accountService
                             , IAccountProfileService accountProfileService)
        {
            _accountService        = accountService;
            _accountProfileService = accountProfileService;

            //Calling this built in helper will check that the current User Identity is set before methods can be called.
            this.RequiresAuthentication();
            #region Handler Methods
            Get["/profile"] = p =>
            {
                var result = GetProfileViewModel();
                return(result);
            };
            Get["/states/{countryId}"] = p =>
            {
                var result = GetStateProvincesForCountry(p.CountryId);
                return(result);
            };
            Post["/profile"] = p =>
            {
                var model = this.Bind <ProfileViewModel>();
                SaveProfile(model);
                return(model);
            };
            #endregion
        }
예제 #4
0
 public LoginEvent(
     IAccountProfileService extensionService,
     UserManager <IUser> userManager
     )
 {
     _extensionService = extensionService;
     _userManager      = userManager;
 }
 public BraksnUpdateContentsHandler(
     IClock clock,
     IHttpContextAccessor httpContextAccessor,
     IAccountProfileService extensionService
     )
     : base(clock, httpContextAccessor)
 {
     _extensionService    = extensionService;
     _httpContentAccessor = httpContextAccessor;
 }
예제 #6
0
 public AccountService(
     IStoredProcedureService storedProcedure,
     RandomMaker randomMaker,
     Cryptograph cryptograph,
     IAccountProfileService accountProfileService,
     IAccountDeviceService accountDeviceService,
     JwtHandler jwtHandler)
 {
     _storedProcedure       = storedProcedure;
     _randomMaker           = randomMaker;
     _cryptograph           = cryptograph;
     _accountProfileService = accountProfileService;
     _accountDeviceService  = accountDeviceService;
     _jwtHandler            = jwtHandler;
 }
예제 #7
0
 public AccountController(
     IAccountService accountService,
     IAccountProfileService accountProfileService,
     RandomMaker randomMaker,
     Cryptograph cryptograph,
     IEmailService emailService,
     ISMSService smsService,
     IMemoryCache memoryCache)
 {
     _accountService        = accountService;
     _accountProfileService = accountProfileService;
     _randomMaker           = randomMaker;
     _cryptograph           = cryptograph;
     _emailService          = emailService;
     _smsService            = smsService;
     _memoryCache           = memoryCache;
 }
예제 #8
0
 public UserProfileDisplayDriver(IAccountProfileService extensionService, IClock clock)
 {
     _extensionService = extensionService;
     _clock            = clock;
 }
 public AccountProfileController(ILoggedUserProvider loggedUserProvider, ServiceFactoryBase serviceFactory)
     : base(loggedUserProvider, serviceFactory)
 {
     _accountService = serviceFactory.CreateAccountService();
     _accountProfileService = serviceFactory.CreateAccountProfileService();
 }
예제 #10
0
 public void TestFixtureSetUp()
 {
     _mockrepository        = new Mock <IAccountProfileRepository>().As <IAccountProfileRepository>();
     _accountProfileService = new Services.AccountProfileService(new AccountProfileRepository());
 }
 public AccountProfileServiceUnitTest()
 {
     _accountProfileService = ServiceLocator.Current.GetInstance <IAccountProfileService>();
     _randomMaker           = ServiceLocator.Current.GetInstance <RandomMaker>();
 }
 public BraksnUserEventHandler(
     IAccountProfileService extensionService
     )
 {
     _extensionService = extensionService;
 }
예제 #13
0
 public UpdateProfileHandler(ILogger <UpdateProfileHandler> logger, IMTSessionManager manager, IAccountProfileService profileService)
 {
     this.logger         = logger;
     this.manager        = manager;
     this.profileService = profileService;
 }