#nullable enable using Microsoft.AspNetCore.Authorization; namespace Bit.Api.AdminConsole.Authorization; /// /// An attribute which requires authorization using the specified requirement. /// This uses the standard ASP.NET authorization middleware. /// /// The IAuthorizationRequirement that will be used to authorize the user. public class AuthorizeAttribute : AuthorizeAttribute, IAuthorizationRequirementData where T : IAuthorizationRequirement, new() { public IEnumerable GetRequirements() { var requirement = new T(); return [requirement]; } }