using System;
using Microsoft.AspNetCore.Builder;

namespace StellaOps.Authority.RateLimiting;

internal static class AuthorityRateLimitingApplicationBuilderExtensions
{
    public static IApplicationBuilder UseAuthorityRateLimiterContext(this IApplicationBuilder app)
    {
        ArgumentNullException.ThrowIfNull(app);
        return app.UseMiddleware<AuthorityRateLimiterMetadataMiddleware>();
    }
}
