U4-8850 Configuring a custom BackOfficeUserManager type will not work if the type is not specifically BackOfficeUserManager

This commit is contained in:
Shannon
2016-08-12 12:20:00 +02:00
parent de2d4bef13
commit 2ff3ce933b
12 changed files with 156 additions and 56 deletions

View File

@@ -17,7 +17,7 @@ namespace Umbraco.Core.Security
private readonly ILogger _logger;
private readonly IOwinRequest _request;
public BackOfficeSignInManager(BackOfficeUserManager userManager, IAuthenticationManager authenticationManager, ILogger logger, IOwinRequest request)
public BackOfficeSignInManager(UserManager<BackOfficeIdentityUser, int> userManager, IAuthenticationManager authenticationManager, ILogger logger, IOwinRequest request)
: base(userManager, authenticationManager)
{
if (logger == null) throw new ArgumentNullException("logger");
@@ -35,7 +35,7 @@ namespace Umbraco.Core.Security
public static BackOfficeSignInManager Create(IdentityFactoryOptions<BackOfficeSignInManager> options, IOwinContext context, ILogger logger)
{
return new BackOfficeSignInManager(
context.GetUserManager<BackOfficeUserManager>(),
context.GetBackOfficeUserManager(),
context.Authentication,
logger,
context.Request);