public static IdentityBuilder AddStrongPass <TUser>(this IdentityBuilder @this, Action <StrongPassOptions> optionsAction) where TUser : class
        {
            var options = new StrongPassOptions();

            optionsAction(options);

            @this.Services.AddSingleton <StrongPassOptions>(options);
            @this.AddPasswordValidator <PasswordValidator <TUser> >();

            return(@this);
        }
示例#2
0
 public PasswordValidator(StrongPassOptions options)
 {
     _options   = options;
     _passwords = options.BuildPasswords();
 }