public BearerSignInManager(IOptions <BearerSignInManagerOptions> options, UserManager <UserType> userManager, IOptions <IdentityOptions> identityOptions, IBearerTokenStore <BearerTokenType> bearerTokenStore, ILogger <BearerSignInManager <UserType, BearerTokenType> >?logger = null) { errorDetailsProvider = new ErrorDetailsProvider(() => options.Value.IncludeErrorDetails, logger); signInManagerOptions = options.Value; this.userManager = userManager; this.identityOptions = identityOptions; this.bearerTokenStore = bearerTokenStore; this.logger = logger; }
public AccountManager(IOptions <AccountManagerOptions> accountManagerOptions, DbContextType dbContext, UserManager <UserType> userManager, RoleManager <RoleType> roleManager, ILogger <AccountManager <DbContextType, UserType, RoleType> >?logger = null) { errorDetailsProvider = new ErrorDetailsProvider(() => accountManagerOptions.Value.IncludeErrorDetails, logger); this.accountManagerOptions = accountManagerOptions.Value; // We ensure, that this instance is not tracking user or role. But it does not // prevent that the user manager and the role manager are tracking them. So we // have to try to get first the local tracked entity before we get an untracked // entity. Otherwise it would cause into an exception where two instances with // same key are accidentally tracked. dbContext.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking; this.dbContext = dbContext; this.userManager = userManager; this.roleManager = roleManager; this.logger = logger; }