Remove unused AuthExtensions.cs and its extension method

Deleted the AuthExtensions.cs file, which included the AuthorizePolicyAsync extension for IAuthorizationService. This method and related code were no longer needed.
This commit is contained in:
2026-02-06 13:23:17 +01:00
parent 1b10162c85
commit 27f0aae8e0

View File

@@ -1,25 +0,0 @@
using Microsoft.AspNetCore.Authorization;
using System.Security.Claims;
namespace EnvelopeGenerator.API.Extensions;
/// <summary>
///
/// </summary>
public static class AuthExtensions
{
/// <summary>
///
/// </summary>
/// <param name="authService"></param>
/// <param name="user"></param>
/// <param name="policyName"></param>
/// <returns></returns>
public static async Task<bool> AuthorizePolicyAsync(this IAuthorizationService authService,
ClaimsPrincipal user,
string policyName)
{
var result = await authService.AuthorizeAsync(user, policyName);
return result.Succeeded;
}
}