using Ablera.Serdica.Authorization;
using Ablera.Serdica.Authorization.Models;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ablera.Serdica.DependencyInjection;

public static class AuthorizationServiceCollectionExtensions
{
    public static IServiceCollection AddSerdicaAuthorization(this IServiceCollection services, IConfiguration configuration)
    {
        return services
            .Configure<RolesConfig>(configuration.GetSection(nameof(RolesConfig)))
            .AddSingleton<GroupsUtilities>();
    }
}
