using Connected.Annotations; using Connected.Security.Authentication.Middleware; using Connected.Security.Authorization; using Connected.Security.Cryptography; using Microsoft.Extensions.DependencyInjection; [assembly: MicroService(MicroServiceType.Sys)] namespace Connected.Security; internal class SecurityStartup : Startup { protected override void OnConfigureServices(IServiceCollection services) { services.AddSingleton(typeof(ICryptographyService), typeof(CryptographyService)); services.AddScoped(typeof(IAuthenticationMiddleware), typeof(DefaultAuthenticationMiddleware)); services.AddScoped(typeof(Authentication.IAuthenticationService), typeof(Authentication.AuthenticationService)); services.AddScoped(typeof(IAuthenticationMiddleware), typeof(DefaultAuthenticationMiddleware)); services.AddScoped(typeof(IAuthorizationService), typeof(AuthorizationService)); } }