0
我有一個登錄頁面,當通過身份驗證後返回到此頁面的已通過身份驗證的用戶時,我希望他們自己重新進行身份驗證。現在,這是我的:重置身份驗證Cookie
protected void Page_Init(object sender, EventArgs e)
{
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
if (User.Identity.IsAuthenticated)
{
var authenticationManager = HttpContext.Current.GetOwinContext().Authentication;
authenticationManager.SignOut();
}
}
我該如何清除身份驗證cookie並設置一個新的?我正在使用身份驗證。
謝謝。