public IHttpActionResult Logout() { var principal = RequestContext.Principal as ClaimsPrincipal; if (principal.Identity.IsAuthenticated) { UserConfig.AddLoggedOutUser(principal.FindFirst(e => e.Type == "user").Value); //principal mevcut kullanıcı. return(Ok("User logged out.")); } return(BadRequest("User did not login.")); }
public IHttpActionResult Logout() { var principle = RequestContext.Principal as ClaimsPrincipal; if (principle.Identity.IsAuthenticated) { UserConfig.AddLoggedOutUser(principle.FindFirst(e => e.Type == "user").Value); return(Ok("User logged out")); } return(BadRequest("User didn't login!")); }