using adas_core.LdapLogin.Configuration;
using FluentValidation;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace adas_core.LdapLogin.RegistrationExtension;

public static class LdapRegistration
{
    public static void AddLdapAuth(this IServiceCollection serviceCollection, IConfigurationRoot configuration)
    {
        serviceCollection.AddSingleton<IValidator<LdapConfig>, LdapConfigValidator>();
        LdapModule.Configure(serviceCollection, configuration);
    }
}