Adds Infrastructure security cryptography service (#43)

* Adds Infrastructure security cryptography service

* Updates GitHub Action script to account for empty Environment values

* Updates section of GitHub Action script

* Fixes order of configuration settings import

* Hardcodes secrets used during integration tests
This commit is contained in:
BinaryAlley authored and GitHub committed 2024-11-06 19:11:03 +02:00
1 parent a71487eb05
commit 09928047d0
12 files changed
+280 -8

No files matched your search

@@ -23,7 +23,8 @@ public static class InfrastructureLayerServices
// scan the current assembly for validators and add them to the DI container
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly(), ServiceLifetime.Singleton);
services.AddTransient<IHashService, HashService>();
services.AddSingleton<IHashService, HashService>();
services.AddSingleton<ICryptographyService, CryptographyService>();
return services;
}
}
@@ -43,12 +43,21 @@ public static class SharedConfiguration
.ValidateFluently()
.ValidateOnStart();
services.AddOptions<MediaSettingsModel>()
.Bind(configuration.GetRequiredSection(MediaSettingsModel.SECTION_NAME))
.ValidateFluently()
.ValidateOnStart();
services.AddOptions<JwtSettingsModel>()
.Bind(configuration.GetRequiredSection(JwtSettingsModel.SECTION_NAME))
.ValidateFluently()
.ValidateOnStart();
services.AddOptions<EncryptionSettingsModel>()
.Bind(configuration.GetRequiredSection(EncryptionSettingsModel.SECTION_NAME))
.ValidateFluently()
.ValidateOnStart();
return services;
}
}