Add AuthLifetimeService

Refactor AuthManager
This commit is contained in:
2021-06-04 18:32:47 +02:00
parent adcde19346
commit 2b81f3e5ba
13 changed files with 281 additions and 58 deletions

View File

@@ -32,11 +32,17 @@ namespace Akari.Prototype.Server
.Bind(Configuration.GetSection(TcpProviderOptions.SectionPath))
.ValidateDataAnnotations();
services.AddOptions<AkariOptions>()
.Bind(Configuration.GetSection(AkariOptions.SectionPath))
.ValidateDataAnnotations();
services.AddSingleton<IFingerprintManager, FingerprintManager>();
services.AddSingleton<IAuthManager, AuthManager>();
services.AddSingleton<IKeyManager, KeyManager>();
services.AddSingleton<AkariPath>();
services.AddHostedService<TcpProviderService>();
services.AddHostedService<AuthLifetimeService>();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.