jjzjj

isPersistent

全部标签

c# - 如何阅读 MVC OWIN AuthenticationProperties?

我在用户登录时设置IsPersistent,如何读回该值?varidentity=awaitUserManager.CreateIdentityAsync(appUser,DefaultAuthenticationTypes.ApplicationCookie);HttpContext.GetOwinContext().Authentication.SignIn(newAuthenticationProperties(){IsPersistent=false},identity); 最佳答案 AspNet.Identity使您可以访

c# - 如何阅读 MVC OWIN AuthenticationProperties?

我在用户登录时设置IsPersistent,如何读回该值?varidentity=awaitUserManager.CreateIdentityAsync(appUser,DefaultAuthenticationTypes.ApplicationCookie);HttpContext.GetOwinContext().Authentication.SignIn(newAuthenticationProperties(){IsPersistent=false},identity); 最佳答案 AspNet.Identity使您可以访

c# - IsPersistent 在 OWIN Cookie 身份验证中的工作原理

我好像不太明白OWINcookie认证中的IsPersistent是如何工作的,下面的代码是使用IsPersistent:varcontext=Request.GetOwinContext();varauthManager=context.Authentication;varproperties=newAuthenticationProperties{IsPersistent=isPersistence};authManager.SignIn(properties,identity);当用户选中/取消选中Rememberme(后面使用IsPersistent)时,我看不出有什么不同,因

c# - IsPersistent 在 OWIN Cookie 身份验证中的工作原理

我好像不太明白OWINcookie认证中的IsPersistent是如何工作的,下面的代码是使用IsPersistent:varcontext=Request.GetOwinContext();varauthManager=context.Authentication;varproperties=newAuthenticationProperties{IsPersistent=isPersistence};authManager.SignIn(properties,identity);当用户选中/取消选中Rememberme(后面使用IsPersistent)时,我看不出有什么不同,因

c# - FormsAuthenticationTicket isPersistent 属性的用途是什么?

我正在努力了解FormsAuthenticationTicket类中的isPersistent属性的用途。http://msdn.microsoft.com/en-us/library/kybcs83h.aspx是否存在设置isPersistent有效的场景?在什么情况下我希望将isPersistent设置为true和false?该属性似乎是多余的,因为我发现在浏览器session中保留我的用户身份验证cookie的唯一方法是设置创建票证后创建的cookie的Expires属性;即使门票的isPersistent值设置为false。我还发现将isPersistent设置为true的票证