public UserManagmentLogicValidation(CursedAuthenticationContext db, IErrorHandlerFactory errorHandlerFactory, IHttpContextAccessor contextAccessor, IGenPasswordHash genPasswordHash) { this.db = db; this.errorHandlerFactory = errorHandlerFactory; this.contextAccessor = contextAccessor; this.genPasswordHash = genPasswordHash; }
public static async Task ClearDatabase(CursedAuthenticationContext context) { await context.Role.ClearIfAny(); await context.UserData.ClearIfAny(); await context.UserAuth.ClearIfAny(); await context.SaveChangesAsync(); }
public UserManagmentController(CursedAuthenticationContext db, [FromServices] IGenPasswordHash genPasswordHash, [FromServices] IErrorHandlerFactory errorHandlerFactory, [FromServices] IHttpContextAccessor contextAccessor, [FromServices] ILogProvider <CursedAuthenticationContext> logProvider) { logic = new UserManagmentLogic(db, genPasswordHash); logicValidation = new UserManagmentLogicValidation(db, errorHandlerFactory, contextAccessor, genPasswordHash); this.logProvider = logProvider; }
public AuthenticationController( CursedAuthenticationContext db, [FromServices] IErrorHandlerFactory errorHandlerFactory, [FromServices] IGenPasswordHash genPassHash, [FromServices] ILogProvider <CursedAuthenticationContext> logProvider) { logic = new AuthenticationLogic(db); logicValidation = new AuthenticationLogicValidation(db, errorHandlerFactory, genPassHash); this.logProvider = logProvider; }
public TestsFixture() { var options = new DbContextOptionsBuilder <CursedDataContext>() .UseInMemoryDatabase(databaseName: "CursedTestingDB") .Options; db = new CursedDataContext(options); dbAuth = new CursedAuthenticationContext(new DbContextOptionsBuilder <CursedAuthenticationContext>() .UseInMemoryDatabase(databaseName: "CursedAuthTestingDB") .Options); }
public UserManagmentLogic(CursedAuthenticationContext db, IGenPasswordHash genPasswordHash) { this.db = db; this.genPasswordHash = genPasswordHash; }
public LogsController(CursedAuthenticationContext db) { logic = new LogsLogic(db); }
public LogsLogic(CursedAuthenticationContext db) { this.db = db; }
public AuthenticationLogicValidation(CursedAuthenticationContext db, IErrorHandlerFactory errorHandlerFactory, IGenPasswordHash genPassHash) { this.db = db; this.errorHandlerFactory = errorHandlerFactory; this.genPassHash = genPassHash; }