Fixes user lockout with aspnet identity

This commit is contained in:
Shannon
2015-07-01 18:02:58 +02:00
parent 53a0c55b14
commit d0c4b2ab72
5 changed files with 41 additions and 12 deletions

View File

@@ -102,6 +102,10 @@ namespace Umbraco.Core.Security
manager.UserLockoutEnabledByDefault = true;
manager.MaxFailedAccessAttemptsBeforeLockout = membershipProvider.MaxInvalidPasswordAttempts;
//NOTE: This just needs to be in the future, we currently don't support a lockout timespan, it's either they are locked
// or they are not locked, but this determines what is set on the account lockout date which corresponds to whether they are
// locked out or not.
manager.DefaultAccountLockoutTimeSpan = TimeSpan.FromDays(30);
//custom identity factory for creating the identity object for which we auth against in the back office
manager.ClaimsIdentityFactory = new BackOfficeClaimsIdentityFactory();