Esempio n. 1
0
 public RegisterPage(Evento evento)
 {
     InitializeComponent();
     this.evento = evento;
     _services   = DependencyService.Get <IAccountManagerService>();
     tcs         = new TaskCompletionSource <bool>();
 }
Esempio n. 2
0
 public FileUploadController(FileDataContext context, IHostingEnvironment hostingEnvironment, IFileService fileService, IAccountManagerService accountManagerService)
 {
     this.Context               = context;
     this.HostingEnvironment    = hostingEnvironment;
     this.FileService           = fileService;
     this.AccountManagerService = accountManagerService;
 }
 public RequiredAccountManagerFilter(IAccountManagerService service)
 {
     if ((this.service = service) == null)
     {
         throw new ArgumentNullException(paramName: "service");
     }
 }
Esempio n. 4
0
        public AuthApiControllerTest()
        {
            _accountManagerService = Substitute.For <IAccountManagerService>();

            _httpContext = Substitute.For <HttpContext>();

            var authServiceMock     = Substitute.For <IAuthenticationService>();
            var serviceProviderMock = Substitute.For <IServiceProvider>();

            authServiceMock.SignInAsync(Arg.Any <HttpContext>(), Arg.Any <string>(), Arg.Any <ClaimsPrincipal>(), Arg.Any <AuthenticationProperties>())
            .Returns(Task.FromResult((object)null));
            serviceProviderMock.GetService(typeof(IAuthenticationService)).Returns(authServiceMock);

            _httpContext.RequestServices.Returns(serviceProviderMock);

            var logger = Substitute.For <ILogger <AuthController> >();

            _authController =
                new AuthController(_accountManagerService, logger)
            {
                ControllerContext = new ControllerContext {
                    HttpContext = _httpContext
                }
            };
        }
Esempio n. 5
0
        public AccountApiControllerTest()
        {
            _accountManagerService = Substitute.For <IAccountManagerService>();
            var logger = Substitute.For <ILogger <AccountController> >();

            _accountController = new AccountController(_accountManagerService, logger);
        }
Esempio n. 6
0
 public AuthController(IAccountManagerService userService, IConfiguration configuration, UserManager <UserProfile> userManager, SignInManager <UserProfile> signInManager)
 {
     _userService   = userService;
     _configuration = configuration;
     _userManager   = userManager;
     _signInManager = signInManager;
 }
Esempio n. 7
0
        public TicketListQueryService(IAccountManagerService accountManagerService, IWorkflowService workflowService, IMapper mapper)
        {
            this.accountManagerService = accountManagerService;
            this.workflowService       = workflowService;
            this.mapper = mapper;

            workflowStatusServiceResult = new List <WorkflowDetails>();
        }
 public TicketController(
     TicketDataContext context,
     IWorkflowService workflowService,
     IAuthService authService,
     IAccountManagerService accountManagerService
     )
 {
     this.Context               = context;
     this.WorkflowService       = workflowService;
     this.AuthService           = authService;
     this.AccountManagerService = accountManagerService;
 }
 public TicketVariableIncomeController(
     TicketDataContext context,
     IWorkflowService workflowService,
     IAccountManagerService accountManagerService,
     IMapper mapper,
     TicketListQueryService <TicketVariableIncome, TicketVariableIncomeModel> ticketQueryPaginatedService
     )
 {
     this.context               = context;
     this.workflowService       = workflowService;
     this.accountManagerService = accountManagerService;
     this.mapper = mapper;
     this.ticketQueryPaginatedService = ticketQueryPaginatedService;
 }
Esempio n. 10
0
        public AccountManagerServiceTests()
        {
            _userManager = Substitute.For <UserManager <JobApplicationUser> >(Substitute.For <IUserStore <JobApplicationUser> >(),
                                                                              Substitute.For <IOptions <IdentityOptions> >(),
                                                                              Substitute.For <IPasswordHasher <JobApplicationUser> >(),
                                                                              Substitute.For <IEnumerable <IUserValidator <JobApplicationUser> > >(),
                                                                              Substitute.For <IEnumerable <IPasswordValidator <JobApplicationUser> > >(),
                                                                              Substitute.For <ILookupNormalizer>(),
                                                                              Substitute.For <IdentityErrorDescriber>(),
                                                                              Substitute.For <IServiceProvider>(),
                                                                              Substitute.For <ILogger <UserManager <JobApplicationUser> > >());

            _tokenGenerator = Substitute.For <ITokenGenerator>();

            _accountManagerService = new AccountManagerService(_userManager, _tokenGenerator);
        }
Esempio n. 11
0
 public UserService(
     DataContext context,
     IAccountManagerService accountManagerService,
     IOptions <ApplicationSettings> applicationSettings,
     IEmailService emailService,
     IExportService exportService,
     IHostingEnvironment environment,
     IMapper mapper
     )
 {
     this.Context = context;
     this.AccountManagerService = accountManagerService;
     this.ApplicationSettings   = applicationSettings.Value;
     this.EmailService          = emailService;
     this.ExportService         = exportService;
     this.Environment           = environment;
     this.Mapper = mapper;
 }
        public async Task <IActionResult> ChangePassword(
            [FromServices] IAccountManagerService _accountManagerService,
            [FromBody] ChangePasswordDTO changePasswordDTO)
        {
            changePasswordDTO.Validate();
            if (changePasswordDTO.Invalid)
            {
                return(BadRequest(new ResultDTO(false, "An error ocurred.", changePasswordDTO.Notifications)));
            }

            var result = await _accountManagerService.ChangePassword(changePasswordDTO, User);

            if (result.Success == false)
            {
                return(BadRequest(result));
            }

            return(Ok(result));
        }
Esempio n. 13
0
        public AuthyPage()
        {
            InitializeComponent();
            Title = "Conectar cuentas";

            var deleteButton = new ToolbarItem {
                Text = "Delete"
            };

            deleteButton.Clicked += (s, a) =>
            {
                _services.EraseAll();
            };

            ToolbarItems.Add(deleteButton);

            _services = DependencyService.Get <IAccountManagerService>();

            facebook.Clicked += ViewProfileButton_Clicked;
            github.Clicked   += ViewProfileButton_Clicked;
            twitter.Clicked  += ViewProfileButton_Clicked;
        }
Esempio n. 14
0
 public AuthService(
     IOptions <JWTTokenSettings> jwtTokenSettings,
     IOptions <PasswordSettings> passwordSettings,
     IOptions <UserSettings> userSettings,
     DataContext context,
     IUserService userService,
     IEmailService emailService,
     IOptions <ApplicationSettings> applicationSettings,
     IHostingEnvironment environment,
     IConfiguration configuration,
     IAccountManagerService accountManager)
 {
     this.jwtTokenSettings    = jwtTokenSettings.Value;
     this.passwordSettings    = passwordSettings.Value;
     this.userSettings        = userSettings.Value;
     this.Context             = context;
     this.UserService         = userService;
     this.EmailService        = emailService;
     this.ApplicationSettings = applicationSettings.Value;
     this.Environment         = environment;
     this.Configuration       = configuration;
     this.AcoountManager      = accountManager;
 }
Esempio n. 15
0
 public AccountManagerController(IAccountManager principal, IAccountManagerService service)
 {
     _service   = service;
     _principal = principal;
 }
Esempio n. 16
0
 public AccountsController(IAccountService accountService, IEmployeeService employeeService, IAccountManagerService accountManagerService)
 {
     this.accountService        = accountService;
     this.employeeService       = employeeService;
     this.accountManagerService = accountManagerService;
 }
 public SecurityService(DataContext context, IUserService userService, IAccountManagerService accountManagerService)
 {
     this.Context               = context;
     this.UserService           = userService;
     this.AccountManagerService = accountManagerService;
 }
Esempio n. 18
0
 public OpcionesViewModel(INavigation Navigation)
 {
     this.Navigation = Navigation;
     _services       = DependencyService.Get <IAccountManagerService>();
 }
Esempio n. 19
0
 public AccountService(ISoftuniStoreData data)
     : base(data)
 {
     this.manager = new AccountManagerService(data);
 }
 public TicketSignoffController(TicketDataContext context, IMapper mapper, IAccountManagerService accountManagerService)
 {
     this.Context = context;
     this.Mapper  = mapper;
     this.AccountManagerService = accountManagerService;
 }
Esempio n. 21
0
 public SecurityController(ISecurityService securityService, IAccountManagerService accountManagerService)
 {
     this.SecurityService       = securityService;
     this.AccountManagerService = accountManagerService;
 }
Esempio n. 22
0
 public AccountController(IAccountManagerService accountManagerService, ILogger <AccountController> logger)
 {
     _accountManagerService = accountManagerService;
     _logger = logger;
 }