I have an asp.net core web api running on Linux server (using PCF cloud). I want to pass user credential from angular app to this web api. I tried with angular option withCredentials = true but it is not passing user windows login id.
on Asp.net Core web api, I tried multiple options like
Context.User.Identity.Name
Environment.Username
_httpContextAccessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value
but nothing seems to be working. I tried finding it out on google but no luck. followed this url to setup but it is also not working...
https://www.koskila.net/how-to-get-current-user-in-asp-net-core/
If I run services locally on windows machine then everything works fine and I can get userid in my web api. I also tried hosting this asp.net core web api on Windows server IIS and it is also working fine.
The only issue comes when I host my service on PCF Linux box. I can understand Linux will not support the concept of Windows identity but is there any way I can pass just username with domain to asp.net core on Linux, I don't need full windows identity, just username will do.