Refactor and Test Application Controller and ApiKey Access Authorization Handling ...

This commit is contained in:
2026-10-17 01:18:14 +03:30
parent 6b648ede44
commit 9fb70e14d7
5 changed files with 94 additions and 18 deletions
+3 -2
View File
@@ -14,6 +14,7 @@ using xIdentityService.Constants;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.DependencyInjection;
namespace xIds.Providers
{
@@ -56,6 +57,7 @@ namespace xIds.Providers
/// Handle Authorization Filtering Using Tasks ...
/// </summary>
/// <param name="context"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
private async Task OnAuthorizationAsync(
AuthorizationFilterContext context,
@@ -78,8 +80,7 @@ namespace xIds.Providers
//
// Retrieve the application provider from DI ...
var applicationProvider = http.RequestServices
.GetService(typeof(IXApplicationProvider))
as IXApplicationProvider;
.GetService<IXApplicationProvider>();
if (applicationProvider.IsNull())
{
//