public UserController(CurrentLoginInfo currentLoginInfo, IUserService userService, IBankAccountService bankAccountService, ILogger <IUserController> logger) { this.CurrentLoginInfo = currentLoginInfo; this.UserService = userService; this.BankAccountService = bankAccountService; this.Logger = logger; }
public BankAccountController(CurrentLoginInfo currentLoginInfo, IUserService userService, IBankAccountService bankAccountService, ITransactionService transactionService, ICurrencyService currencyService, ILogger <IUserController> logger) { this.CurrentLoginInfo = currentLoginInfo; this.UserService = userService; this.BankAccountService = bankAccountService; this.TransactionService = transactionService; this.CurrencyService = currencyService; this.Logger = logger; }
public async Task InvokeAsync(HttpContext context, CurrentLoginInfo currentLoginInfo, IJwtSessionService jwtSessionService) { var session = currentLoginInfo.Session ?? string.Empty; if (!string.IsNullOrWhiteSpace(session) && !jwtSessionService.ContainsKey(session)) { context.Response.Clear(); context.Response.StatusCode = StatusCodes.Status401Unauthorized; } else { await Next(context); } }
public ExchangeRateController(CurrentLoginInfo currentLoginInfo, IExchangeRateHistoryService exchangeRateHistoryService, ILogger <IExchangeRateController> logger) { this.CurrentLoginInfo = currentLoginInfo; this.ExchangeRateHistoryService = exchangeRateHistoryService; this.Logger = logger; }