This commit is contained in:
Paul Schneider 2021-01-04 00:11:27 +00:00
commit d12667d6de
11 changed files with 53 additions and 36 deletions

View file

@ -333,7 +333,6 @@ namespace test
ApplicationUser user = null;
user = DbContext.Users.Include(u => u.Membership).First(u => u.UserName == context.UserName);
#if USERMANAGER
if (await _usermanager.CheckPasswordAsync(user, context.Password))
{
@ -359,6 +358,7 @@ namespace test
context.HttpContext.User = principal;
context.Validated(principal);
}
#if USERMANAGER
#endif
return Task.FromResult(0);
}
@ -413,16 +413,17 @@ namespace test
#endregion
#if USERMANAGER
_usermanager = usermanager;
#endif
UserManager<ApplicationUser> _usermanager;
public void Configure(
IApplicationBuilder app,
IHostingEnvironment env,
ApplicationDbContext dbContext,
IOptions<Testing> testingSettings,
ILoggerFactory loggerFactory)
UserManager<ApplicationUser> usermanager,
ILoggerFactory loggerFactory
)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
@ -430,6 +431,11 @@ namespace test
logger.LogInformation(env.EnvironmentName);
this.DbContext = dbContext;
Testing = testingSettings.Value;
_usermanager = usermanager;
#if USERMANAGER
#endif
if (Testing.ConnectionStrings == null)
logger.LogInformation($" Testing.ConnectionStrings is null : ");
else