コード例 #1
0
 public UserController(CurrentLoginInfo currentLoginInfo, IUserService userService, IBankAccountService bankAccountService, ILogger <IUserController> logger)
 {
     this.CurrentLoginInfo   = currentLoginInfo;
     this.UserService        = userService;
     this.BankAccountService = bankAccountService;
     this.Logger             = logger;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
 public ExchangeRateController(CurrentLoginInfo currentLoginInfo, IExchangeRateHistoryService exchangeRateHistoryService, ILogger <IExchangeRateController> logger)
 {
     this.CurrentLoginInfo           = currentLoginInfo;
     this.ExchangeRateHistoryService = exchangeRateHistoryService;
     this.Logger = logger;
 }