public ActionResult SignOut()
        {
            if (Request.IsAuthenticated)
            {
                var tokenStore = new SessionStore(null,
                                                  System.Web.HttpContext.Current, ClaimsPrincipal.Current);

                tokenStore.Clear();

                Request.GetOwinContext().Authentication.SignOut(
                    CookieAuthenticationDefaults.AuthenticationType);
            }

            return(RedirectToAction("Index", "Home"));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Clear session on logout
 /// </summary>
 /// <param name="sessionCtx"></param>
 private void ClearEmployeeDetails(ISessionContext sessionCtx)
 {
     SessionStore.Clear();
 }