-
ASP.NET Core
ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I am coming from .Net Framework and supporting the legacy apps to .Net Core ecosystem fairly recently, so I might have missed couple of release notes so please bear with me. In the .Net Framework usage of HttpContext outside HttpRequest was discouraged because it isn't thread safe. Now I get this feedback and then I google around a bit and I find topics like this: https://github.com/dotnet/AspNetCore.Docs/issues/18419 or like this onehttps://learn.microsoft.com/en-us/answers/questions/1143595/asp-net-core-web-api-how-to-use-user-claims-in-ser
the guy answering on learn.ms.com uses the same approach in principle (via the IHttpContextAccessor) but in a way that introduces coupling between the business service and the asp.net framework
As others have pointed out, you can use the IHttpContextAccessor. You can see an example implementation in Jason Taylor's Clean Architecture template here: https://github.com/jasontaylordev/CleanArchitecture/blob/main/src/WebUI/Services/CurrentUserService.cs