EncryptionService should be using ISecretProvider

Remove Async from method that was not Async
This commit is contained in:
eelke 2026-02-15 19:18:02 +01:00
parent ccb06b260c
commit 3e5ce9d81d
6 changed files with 44 additions and 31 deletions

View file

@ -40,11 +40,7 @@ void ConfigureBuilder(WebApplicationBuilder builder)
services.AddOptions<DbConfiguration>().Bind(configuration.GetSection("db"));
services.AddSingleton<ISecretProvider, ConfigurationSecretProvider>();
services.AddSingleton<KeyMapper>();
services.AddSingleton<IEncryptionService>(c =>
{
var configuration = c.GetRequiredService<IConfiguration>();
return new EncryptionService(configuration.GetValue<string>("Secrets:Master"));
});
services.AddSingleton<IEncryptionService, EncryptionService>();
services.AddValidatorsFromAssemblyContaining<RealmCreateRequestValidator>();