using Microsoft.AspNetCore.Authentication;

namespace PARR.API.RoleProvider
{
    public static class SimpleRoleAuthorizationServiceCollectionExtensions
    {
        public static void AddSimpleRoleAuthorization<TRoleProvider>(this IServiceCollection services)
            where TRoleProvider : class, ISimpleRoleProvider
        {
            services.AddSingleton<ISimpleRoleProvider, TRoleProvider>();
            services.AddSingleton<IClaimsTransformation, SimpleRoleAuthorizationTransform>();
        }
    }
}
