Cómo usar "User.Identity.IsAuthenticated" en la API web
User.Identity.IsAuthenticated
siempre vuelvefalse
en mi proyecto ASP.NET Web API.
En cuentaApiController
Tengo siguiente:
ClaimsIdentity identity = new ClaimsIdentity(claims, DefaultAuthenticationTypes.ApplicationCookie);
AuthenticationManager.SignIn(new AuthenticationProperties() {
IsPersistent = isPersistent
}, identity);
Después de iniciar sesión,User.Identity.IsAuthenticated
es siemprefalse
enApiController
perotrue
en MVC Controller.