Ejemplo n.º 1
0
        public AccountController(
            IUsersService usersService,
            ITokenStoreService tokenStoreService,
            ITokenFactoryService tokenFactoryService,
            IUnitOfWork uow,
            IAntiForgeryCookieService antiforgery,
            ITagServices tagServices,
            IZirReshtehServices zirReshteh
            )
        {
            _zirreshteh   = zirReshteh;
            _Tags         = tagServices;
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _antiforgery = antiforgery;
            _antiforgery.CheckArgumentIsNull(nameof(antiforgery));

            _tokenFactoryService = tokenFactoryService;
            _tokenFactoryService.CheckArgumentIsNull(nameof(tokenFactoryService));
        }
Ejemplo n.º 2
0
        public AccountController(
            IApplicationUserManager usersService,
            ITokenStoreService tokenStoreService,
            ITokenFactoryService tokenFactoryService,
            IApplicationSignInManager signInManager,
            IUnitOfWork uow

            )
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _signInManager = signInManager;
            _signInManager.CheckArgumentIsNull(nameof(_signInManager));


            _tokenFactoryService = tokenFactoryService;
            _tokenFactoryService.CheckArgumentIsNull(nameof(tokenFactoryService));
        }
Ejemplo n.º 3
0
        public AccountController(
            IUsersService usersService,
            ITokenStoreService tokenStoreService,
            ILoginService loginService,
            IAuthLevelService authLevelService,
            IPolicyService policyService,
            IRolesService rolesService,
            IUnitOfWork uow,
            IMapper mapper)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(_tokenStoreService));

            _loginService = loginService;
            _loginService.CheckArgumentIsNull(nameof(_loginService));

            _authLevelService = authLevelService;
            _authLevelService.CheckArgumentIsNull(nameof(_authLevelService));

            _policyService = policyService;
            _policyService.CheckArgumentIsNull(nameof(_policyService));

            _roleService = rolesService;
            _roleService.CheckArgumentIsNull(nameof(_roleService));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));
        }
Ejemplo n.º 4
0
        public TokenValidatorService(IUsersService usersService, ITokenStoreService tokenStoreService)
        {
            this.usersService = usersService;
            this.usersService.CheckArgumentIsNull(nameof(usersService));

            this.tokenStoreService = tokenStoreService;
            this.tokenStoreService.CheckArgumentIsNull(nameof(TokenValidatorService.tokenStoreService));
        }
Ejemplo n.º 5
0
        public AccountController(IUsersService usersService, ITokenStoreService tokenStoreService)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(_tokenStoreService));
        }
Ejemplo n.º 6
0
        public TokenValidatorService(IUsersService usersService, ITokenStoreService tokenStoreService)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(_tokenStoreService));
        }
        public TokenValidatorService(IApplicationUserManager usersService, ITokenStoreService tokenStoreService)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(_tokenStoreService));
        }
Ejemplo n.º 8
0
 public AccountController(IUsersService usersService, ITokenFactoryService tokenFactoryService,
                          ITokenStoreService tokenStoreService, IMapper mapper)
 {
     _usersService        = usersService;
     _tokenFactoryService = tokenFactoryService;
     _tokenStoreService   = tokenStoreService;
     _mapper = mapper;
 }
Ejemplo n.º 9
0
 public Handler(ApplicationDbContext context
                , IUserAccessor userAccessor
                , ITokenStoreService tokenStoreService)
 {
     _context           = context;
     _userAccessor      = userAccessor;
     _tokenStoreService = tokenStoreService;
 }
Ejemplo n.º 10
0
 public AuthController(IUserService userService, IConfiguration configuration, IAntiForgeryCookieService antiforgery, ITokenStoreService tokenService, IAntiforgery antiforgeryService, RoleManager <Role> roleManager)
 {
     this.antiforgery    = antiforgeryService;
     this._tokenService  = tokenService;
     this._configuration = configuration;
     this._userService   = userService;
     this._antiforgery   = antiforgery;
     this.roleManager    = roleManager;
 }
Ejemplo n.º 11
0
 public TokenController(
     IUserService userService,
     ITokenStoreService tokenService,
     IAntiForgeryCookieService antiForgeryCookieService)
 {
     _userService              = userService;
     _tokenService             = tokenService;
     _antiForgeryCookieService = antiForgeryCookieService;
 }
Ejemplo n.º 12
0
        public TokenValidatorService(IUserStore <User> usersStoreService, ITokenStoreService tokenStoreService, ILastLoggedIn lastLoggedIn)
        {
            _usersStoreService = usersStoreService;
            _usersStoreService.CheckArgumentIsNull(nameof(usersStoreService));

            _tokenStoreService = tokenStoreService;
            _lastLoggedIn      = lastLoggedIn;
            _tokenStoreService.CheckArgumentIsNull(nameof(_tokenStoreService));
        }
        public TokenValidatorService(
            IUserService usersService,
            ITokenStoreService tokenStoreService,
            IWorkContext workContext)
        {
            _usersService = usersService;

            _tokenStoreService = tokenStoreService;
            _workContext       = workContext;
        }
Ejemplo n.º 14
0
 public AccountController(
     IUserService usersService,
     IFileService fileService,
     IWebHostEnvironment webHostEnvironment,
     IOptions <AppSettings> appSettings,
     ITokenStoreService tokenStoreService)
 {
     this.usersService       = usersService;
     this.fileService        = fileService;
     this.webHostEnvironment = webHostEnvironment;
     this.appSettings        = appSettings;
     this.tokenStoreService  = tokenStoreService;
 }
        public ApiSettingsController(
            //   ILogger<ApiSettingsController> logger,
            IOptionsSnapshot <ApiSettings> apiSettingsConfig, IUserService userService, IAntiForgeryCookieService antiforgery, ITokenStoreService tokenService,
            IAntiforgery antiforgeryService)
        {
            // _logger = logger;
            this.userService   = userService;
            _apiSettingsConfig = apiSettingsConfig;

            this.antiforgery   = antiforgeryService;
            this._tokenService = tokenService;
            this._antiforgery  = antiforgery;
        }
Ejemplo n.º 16
0
 public AccountService(ITokenFactoryService tokenFactoryService,
                       ITokenStoreService tokenStoreService,
                       IUnitOfWork uow,
                       IAntiForgeryCookieService antiforgery)
 {
     _tokenFactoryService = tokenFactoryService;
     _tokenFactoryService.CheckArgumentIsNull(nameof(tokenFactoryService));
     _uow         = uow;
     _antiforgery = antiforgery;
     _antiforgery.CheckArgumentIsNull(nameof(antiforgery));
     _tokenStoreService = tokenStoreService;
     _tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));
 }
Ejemplo n.º 17
0
 public CustomerController(IPermissionService permissionService,
                           ILocalizationService localizationService,
                           ITokenStoreService tokenStoreService,
                           ITokenFactoryService tokenFactoryService,
                           IWorkContext workContext,
                           IGenericAttributeService genericAttributeService)
 {
     _permissionService       = permissionService;
     _localizationService     = localizationService;
     _tokenStoreService       = tokenStoreService;
     _tokenFactoryService     = tokenFactoryService;
     _workContext             = workContext;
     _genericAttributeService = genericAttributeService;
 }
Ejemplo n.º 18
0
 public Handler(UserManager <AppUser> userManager
                , SignInManager <AppUser> signInManager
                , IOptions <SiteSettings> siteSettings
                , ITokenFactoryService tokenFactory
                , ITokenStoreService tokenStoreService
                , ApplicationDbContext context)
 {
     _userManager       = userManager;
     _signInManager     = signInManager;
     _siteSettings      = siteSettings;
     _tokenFactory      = tokenFactory;
     _tokenStoreService = tokenStoreService;
     _context           = context;
 }
Ejemplo n.º 19
0
        public AccountController(
            IUsersService usersService,
            ITokenStoreService tokenStoreService,
            IUnitOfWork uow,
            IOptionsSnapshot <BearerTokensOptions> configuration)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(_tokenStoreService));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));
        }
Ejemplo n.º 20
0
        public AuthControllerTest() : base()
        {
            _usersService        = base._serviceProvider.GetRequiredService <IUsersService>();
            _tokenStoreService   = base._serviceProvider.GetRequiredService <ITokenStoreService>();
            _tokenFactoryService = base._serviceProvider.GetRequiredService <ITokenFactoryService>();
            _uow = base._serviceProvider.GetRequiredService <IUnitOfWork>();

            var httpContextAccessor = new HttpContextAccessor();

            httpContextAccessor.HttpContext = new DefaultHttpContext();
            _antiforgery = new AntiForgeryCookieService(httpContextAccessor, base._serviceProvider.GetRequiredService <IAntiforgery>(), base._serviceProvider.GetRequiredService <IOptions <AntiforgeryOptions> >()); // base._serviceProvider.GetRequiredService<IAntiForgeryCookieService>();

            _logger = base._serviceProvider.GetRequiredService <ILogger <AuthController> >();

            _controller = new AuthController(_usersService, _tokenStoreService, _tokenFactoryService, _uow, _antiforgery, _logger);
        }
 public SecurityController(ISecurityService securityService,
                           IAuditService loginDeviceAuditService,
                           ITokenStoreService tokenStoreService,
                           IResetPasswordService resetPasswordService,
                           IDeviceProfileConnectionService deviceProfileConnectionService,
                           IDeviceService deviceService,
                           IManufacturerService manufacturerService)
 {
     _securityService                = securityService;
     _loginDeviceAuditService        = loginDeviceAuditService;
     _tokenStoreService              = tokenStoreService;
     _resetPasswordService           = resetPasswordService;
     _deviceProfileConnectionService = deviceProfileConnectionService;
     _deviceService       = deviceService;
     _manufacturerService = manufacturerService;
 }
Ejemplo n.º 22
0
 public LesterRegistrationController(
     ILesterRegistrationService lesterRegistration,
     IUserService userService,
     IAntiForgeryCookieService antiForgery,
     IPermissionService permissionService,
     ITokenStoreService tokenStoreService,
     ITokenFactoryService tokenFactoryService,
     IWorkContext workContext)
 {
     _lesterRegistration  = lesterRegistration;
     _userService         = userService;
     _permissionService   = permissionService;
     _tokenStoreService   = tokenStoreService;
     _tokenFactoryService = tokenFactoryService;
     _antiforgery         = antiForgery;
     _workContext         = workContext;
 }
        //private readonly ISignalRServices _signalRServices;
        //private readonly IAntiForgeryCookieService _antiforgery;

        public AccountController(
            IUsersService usersService,
            ITokenStoreService tokenStoreService)
        //ISignalRServices signalRServices)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));

            //_signalRServices = signalRServices;
            //_signalRServices.CheckArgumentIsNull(nameof(_signalRServices));

            //_antiforgery = antiforgery;
            //_antiforgery.CheckArgumentIsNull(nameof(antiforgery));
        }
Ejemplo n.º 24
0
        public AccountController(
            IUsersService usersService,
            ITokenStoreService tokenStoreService,
            IUnitOfWork uow,
            IAntiforgery antiforgery)
        {
            this.usersService = usersService;
            this.usersService.CheckArgumentIsNull(nameof(usersService));

            this.tokenStoreService = tokenStoreService;
            this.tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));

            this.uow = uow;
            this.uow.CheckArgumentIsNull(nameof(AccountController.uow));

            this.antiforgery = antiforgery;
            this.antiforgery.CheckArgumentIsNull(nameof(antiforgery));
        }
Ejemplo n.º 25
0
        public AccountController(
            IUsersUserIdentityServiceJwt usersService,
            ITokenStoreService tokenStoreService,
            IUnitOfWork uow,
            IAntiForgeryCookieService antiforgery)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _antiforgery = antiforgery;
            _antiforgery.CheckArgumentIsNull(nameof(antiforgery));
        }
        public SecurityController(
            IUserService userService,
            ITokenStoreService tokenStoreService,
            ITokenFactoryService tokenFactoryService,
            IAntiForgeryCookieService antiforgery)
        {
            _userService = userService;
            _userService.CheckArgumentIsNull(nameof(userService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));

            _antiforgery = antiforgery;
            _antiforgery.CheckArgumentIsNull(nameof(antiforgery));

            _tokenFactoryService = tokenFactoryService;
            _tokenFactoryService.CheckArgumentIsNull(nameof(tokenFactoryService));
        }
Ejemplo n.º 27
0
        public AuthController(IUsersService usersService, ITokenStoreService tokenStoreService, ITokenFactoryService tokenFactoryService, IUnitOfWork uow, IAntiForgeryCookieService antiforgery, ILogger <AuthController> logger)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _antiforgery = antiforgery;
            _antiforgery.CheckArgumentIsNull(nameof(antiforgery));

            _tokenFactoryService = tokenFactoryService;
            _tokenFactoryService.CheckArgumentIsNull(nameof(tokenFactoryService));

            _logger = logger;
        }
Ejemplo n.º 28
0
        public AccountsController(
            IUserService usersService,
            ITokenStoreService tokenStoreService,
            ITokenFactoryService tokenFactoryService,
            IAuthenticationUnitOfWork uow,
            IAntiForgeryCookieService antiforgery)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(tokenStoreService));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _antiforgery = antiforgery;
            _antiforgery.CheckArgumentIsNull(nameof(antiforgery));

            _tokenFactoryService = tokenFactoryService;
            _tokenFactoryService.CheckArgumentIsNull(nameof(tokenFactoryService));
        }
Ejemplo n.º 29
0
 public CustomerController(ICustomerService customerService,
                           ICustomerRegistrationService customerRegistrationService,
                           IEventPublisher eventPublisher,
                           ILocalizationService localizationService,
                           IWorkContext workContext,
                           IGenericAttributeService genericAttributeService,
                           IWorkflowMessageService workflowMessageService,
                           ITokenStoreService tokenStoreService,
                           ITokenFactoryService tokenFactoryService,
                           CustomerSettings customerSettings,
                           IAuthenticationService authenticationService)
 {
     _customerService             = customerService;
     _customerRegistrationService = customerRegistrationService;
     _eventPublisher          = eventPublisher;
     _localizationService     = localizationService;
     _workContext             = workContext;
     _genericAttributeService = genericAttributeService;
     _workflowMessageService  = workflowMessageService;
     _tokenStoreService       = tokenStoreService;
     _tokenFactoryService     = tokenFactoryService;
     _customerSettings        = customerSettings;
     _authenticationService   = authenticationService;
 }
Ejemplo n.º 30
0
 public AuthController(UserManager <User> userManager, IAntiForgeryCookieService antiForgery, ITokenStoreService tokenStoreService)
 {
     _userManager       = userManager;
     _antiForgery       = antiForgery;
     _tokenStoreService = tokenStoreService;
 }