3 回答

TA貢獻(xiàn)1886條經(jīng)驗 獲得超2個贊
更新為2.0.0。SecurityStamp
OnValidateIdentity
CookieMiddleware
SecurityStamp
refreshInterval
app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, LoginPath = new PathString("/Account/Login"), Provider = new CookieAuthenticationProvider { // Enables the application to validate the security stamp when the user logs in. // This is a security feature which is used when you change a password or add an external login to your account. OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>( validateInterval: TimeSpan.FromMinutes(30), regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager)) }});
UserManager.UpdateSecurityStampAsync(userId);

TA貢獻(xiàn)1804條經(jīng)驗 獲得超3個贊

TA貢獻(xiàn)1906條經(jīng)驗 獲得超10個贊
services.Configure<SecurityStampValidatorOptions>(o => o.ValidationInterval = TimeSpan.FromSeconds(10));
- 3 回答
- 0 關(guān)注
- 541 瀏覽
添加回答
舉報