Beispiel #1
0
        //DIStore _diStore;
        public HomeController(IHttpHelper httpHelper, IOptions <ConfigOptions> configOptions, DIStore diStore, IHttpContextAccessor httpContextAccessor)
        {
            _httpHelper    = httpHelper;
            _configOptions = configOptions.Value;
            var httpContext = httpContextAccessor.HttpContext;

            //_httpHelper.AddBearerToken(diStore.token);
            if (!String.IsNullOrEmpty(httpContext?.Session?.GetString("token")))
            {
                _httpHelper.AddBearerToken(httpContext.Session.GetString("token"));
            }
        }