feat(api): integrate abstracted token generation and update login endpoint
This commit is contained in:
@@ -4,7 +4,9 @@ public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IPasswordHasher, PasswordHasher>(static (_) => PasswordHasher.New());
|
||||
services.AddSingleton(TimeProvider.System);
|
||||
services.AddSingleton<ITokenGenerator, TokenGenerator>(TokenGenerator.From);
|
||||
services.AddSingleton<IPasswordHasher, PasswordHasher>(PasswordHasher.From);
|
||||
services.ConfigureOptions<AppDbContextOptionsSetup>();
|
||||
services.AddDbContext<AppDbContext>();
|
||||
services.AddHostedService<MigrationService>();
|
||||
|
||||
Reference in New Issue
Block a user