Advertisement
TopFloorSolutions

Serv

Jan 19th, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1.  services.Configure<IdentityOptions>(options =>
  2.     {
  3.         // Password settings
  4.         options.Password.RequireDigit = true;
  5.         options.Password.RequiredLength = 8;
  6.         options.Password.RequireNonAlphanumeric = false;
  7.         options.Password.RequireUppercase = true;
  8.         options.Password.RequireLowercase = false;
  9.        
  10.         // Lockout settings
  11.         options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(30);
  12.         options.Lockout.MaxFailedAccessAttempts = 10;
  13.        
  14.         // Cookie settings
  15.         options.Cookies.ApplicationCookie.ExpireTimeSpan = TimeSpan.FromDays(150);
  16.         options.Cookies.ApplicationCookie.LoginPath = "/Account/LogIn";
  17.         options.Cookies.ApplicationCookie.LogoutPath = "/Account/LogOff";
  18.        
  19.         // User settings
  20.         options.User.RequireUniqueEmail = true;
  21.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement