首页 新闻 赞助 找找看

SecurityStampValidator.OnValidateIdentity回调函数无效,是什么情况

0
悬赏园豆:50 [待解决问题]

// 使应用程序可以使用 Cookie 来存储已登录用户的信息
// 并使用 Cookie 来临时存储有关使用第三方登录提供程序登录的用户的信息
// 配置登录 Cookie
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
Provider = new CookieAuthenticationProvider
{
// 当用户登录时使应用程序可以验证安全戳。
// 这是一项安全功能,当你更改密码或者向帐户添加外部登录名时,将使用此功能。
OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
validateInterval: TimeSpan.FromMinutes(30),
regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
}
});

flyjonson的主页 flyjonson | 初学一级 | 园豆:103
提问于:2020-03-17 18:25
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册