Я вхожу в мое веб-приложение, но переменная isAuthenticated всегда возвращает false
*
https://imgur.com/a/mRWYlBj#YtR6jJf // этот код возвращает true https://imgur.com/a/mRWYlBj#Nj332IC // этот код возвращает false
*
ClaimsPrincipal icp = Thread.CurrentPrincipal as ClaimsPrincipal;
ClaimsIdentity claimsIdentity = (ClaimsIdentity)icp.Identity;
bool isAuthenticated = icp.Identity.IsAuthenticated;
if (!HttpContext.Current.User.Identity.IsAuthenticated)
{
base.HandleUnauthorizedRequest(actionContext);
}
else
{
actionContext.Response = new System.Net.Http.HttpResponseMessage(System.Net.HttpStatusCode.Forbidden);
}