Issue #5: implement sqlite auth store and migrations

This commit is contained in:
Joseph Doherty
2026-04-26 16:29:28 -04:00
parent 0c539834dc
commit ec1155de6d
19 changed files with 744 additions and 0 deletions
@@ -0,0 +1,15 @@
namespace MxGateway.Server.Security.Authentication;
public static class AuthStoreServiceCollectionExtensions
{
public static IServiceCollection AddSqliteAuthStore(this IServiceCollection services)
{
services.AddSingleton<AuthSqliteConnectionFactory>();
services.AddSingleton<IAuthStoreMigrator, SqliteAuthStoreMigrator>();
services.AddSingleton<IApiKeyStore, SqliteApiKeyStore>();
services.AddSingleton<IApiKeyAuditStore, SqliteApiKeyAuditStore>();
services.AddHostedService<AuthStoreMigrationHostedService>();
return services;
}
}