using Ablera.Serdica.Plugin.Contracts;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Ablera.Serdica.Authority.Plugins.Base.Contracts;
using Ablera.Serdica.Authority.Plugin.Ldap;
using Ablera.Serdica.DBModels.Serdica;
using Microsoft.AspNetCore.Identity;
using Ablera.Serdica.DependencyInjection;

namespace Ablera.Serdica.Identity.Plugin.Ldap;

public class ServiceRegistrator : IPluginServiceRegistrator
{
    public void RegisterServices(IServiceCollection services, IConfiguration configuration)
        => services
            .RegisterLdapExtensionServices(configuration)
            .AddSingleton<LdapSettingsProvider>()
            .AddScoped<IUserManagementFacade<IdentityUser<string>>, IdentityManagementFacade>();
}
