I can't access my logged in user in my Data Access Layer - Identity server 4 and .NET 4.7.1
问题 I have an API that uses Identity Server 4 for User Authentication based on JWT Bearer Access Token. Now when I Pass in the access_token in my request header I can view the User Details in the User Object in the Controller. But if I try to access the System.Security.Claims.ClaimsPrincipal in my DAL it is different to my logged in user. This is how I configured Authentication for Identity Server 4 in my Web Project Startup.cs In ConfigureServices - services.AddAuthentication("Bearer")