November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
you should not try to inject the password validator, instead you should use ApplicationUserManager.PasswordValidator where the ApplicationUserManager can be injected of course.
pretty much untested, but this probably works (adding to ConfigureContainer method of one of your IConfigurableModule)
var services = context.Services;
services.AddSingleton<PasswordValidator>((locator) => new PasswordValidator
{
RequiredLength = 6,
RequireNonLetterOrDigit = false,
RequireDigit = false,
RequireLowercase = false,
RequireUppercase = false
});
Then you can add PasswordValidator into your controller via constructor injection (you would need to register a DependencyResolver if you haven't already)
Hi!
We are developing a new Episerver site with aspnet identity. I managed to configure the passwordvalidator like this:
Now I'm wondering how to access this password validator, when validating a password in a controller?
I tried this:
but it isn't populated with the values I set up in the ApplicationBuilderExtensions.