public UsersController(IUserRepository repo, IMapper mapper, IPermissionsCache permissionsCache,
                        IAuthorizationService authService, UserManager <User> userManager, IBeepMailer mailer)
 {
     _repo             = repo;
     _mapper           = mapper;
     _permissionsCache = permissionsCache;
     _authService      = authService;
     _userManager      = userManager;
     _mailer           = mailer;
 }
Example #2
0
 public AuthController(IAuthRepository authRepo, IUserRepository userRepo, IMapper mapper, IConfiguration config,
                       IPermissionsCache permissionsCache, IBeepMailer mailer, UserManager <User> userManager, SignInManager <User> signInManager)
 {
     _authRepo             = authRepo;
     _userRepo             = userRepo;
     _mapper               = mapper;
     _permissionsCache     = permissionsCache;
     _mailer               = mailer;
     _userManager          = userManager;
     _signInManager        = signInManager;
     _tokenLifeTimeSeconds = Convert.ToInt32(config.GetSection("AppSettings:TokenLifeTime").Value);
     _tokenSecretKey       = config.GetSection("AppSettings:Token").Value;
 }
Example #3
0
 public AuthController(IAuthRepository authRepo, IUserRepository userRepo, IMapper mapper, IConfiguration config,
                       IPermissionsCache permissionsCache, IBeepMailer mailer, UserManager <User> userManager, SignInManager <User> signInManager,
                       TokenValidationParameters tokenValidationParameters)
 {
     _authRepo                  = authRepo;
     _userRepo                  = userRepo;
     _mapper                    = mapper;
     _permissionsCache          = permissionsCache;
     _mailer                    = mailer;
     _userManager               = userManager;
     _signInManager             = signInManager;
     _tokenValidationParameters = tokenValidationParameters;
     _appSettings               = config.GetSection("AppSettings");
     _tokenSecretKey            = config.GetSection("AppSettings:Token").Value;
     _tokenLifeTime             = TimeSpan.FromSeconds(Convert.ToInt32(_appSettings["TokenLifeTime"]));
 }