public UserLogic(IJWTFactory jwtFactory, IUnitOfWork unitOfWork, IPasswordHasher passwordHasher, IEmailService emailService) { _jwtFactory = jwtFactory; _repositories = unitOfWork; _passwordHasher = passwordHasher; _emailService = emailService; }
public AuthController(IUserService userService, UserManager <AppUser> userManager, IJWTFactory jwtFactory, IOptions <JwtIssuerOptions> jwtOptions) { _userService = userService; _userManager = userManager; _jwtFactory = jwtFactory; _jwtOptions = jwtOptions.Value; }
public AuthController(IServiceProvider serviceProvider) { _userRepository = serviceProvider.GetService <IUserRepository>(); _jwtFactory = serviceProvider.GetService <IJWTFactory>(); _tokenFactory = serviceProvider.GetService <ITokenFactory>(); _logger = serviceProvider.GetService <ILogger>(); }
public SysUserAuthentication(IHttpContextAccessor httpContextAccessor, SysUserJwtService sysUserJwtService, IJWTFactory jwtFactory) { _jwtFactory = jwtFactory; _sysUserJwtService = sysUserJwtService; _httpContextAccessor = httpContextAccessor; }
public AccountController(UserManager <UniversityUserModel> userManager, IJWTFactory jwtFactory, IOptions <JWTIssuerOptions> jwtOptions, BLLUnitOfWork bll, IConfigurationRoot config) { _userManager = userManager; _jwtFactory = jwtFactory; _jwtOptions = jwtOptions.Value; _bll = bll; _config = config; }
public static async Task <string> GenerateJwt(ClaimsIdentity identity, IJWTFactory jwtFactory, string userName, JwtIssuerOptions jwtOptions, JsonSerializerSettings serializerSettings) { var response = new { id = identity.Claims.Single(c => c.Type == "id").Value, auth_token = await jwtFactory.GenerateEncodedToken(userName, identity), expires_in = (int)jwtOptions.ValidFor.TotalSeconds }; return(JsonConvert.SerializeObject(response, serializerSettings)); }
public UserService(IJWTFactory jWTFactory, IUnitOfWork unitOfWork, IMapper mapper) { _jWTFactory = jWTFactory; _unitOfWork = unitOfWork; _mapper = mapper; }
public AccountsController(IAccountManager accountManager, ILoggerFactory logger, IJWTFactory jwtFactory) { this.logger = logger.CreateLogger <AccountsController>(); this.accountManager = accountManager; this.jwtFactory = jwtFactory; }
public UserService(IUserRepository userRepository, IJWTFactory jwtFactory) { _userRepository = userRepository; _jwtFactory = jwtFactory; }