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并设置一个新的?我正在使用身份验证。
谢谢。