Quantcast
Channel: asp.net – Trailmax Tech
Viewing all articles
Browse latest Browse all 13

CookieAuthenticationProvider and user session invalidation on change of SecurityStamp

$
0
0
Another question I’ve been asked about Identity. Part of Startup class for Owin can be this: public void ConfigureAuth(IAppBuilder app) { app.UseCookieAuthentication(new CookieAuthenticationOptions { Provider = new CookieAuthenticationProvider { OnValidateIdentity = SecurityStampValidator .OnValidateIdentity<UserManager, ApplicationUser, int>( validateInterval: TimeSpan.FromMinutes(30), regenerateIdentityCallback: (manager, user) => user.GenerateUserIdentityAsync(manager), getUserIdCallback: (id) => (Int32.Parse(id.GetUserId()))) }, }); } The question was “How does SecurityValidator.OnValidateIdentity… Continue reading

Viewing all articles
Browse latest Browse all 13

Trending Articles