This commit is contained in:
2026-11-16 11:20:25 +03:30
parent b6f20c9e79
commit cd9ee26c0f
10 changed files with 617 additions and 137 deletions
+17
View File
@@ -13,6 +13,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using IdentityModel.AspNetCore.OAuth2Introspection;
using xHttpService.Interfaces;
using xExceptions.Constants;
namespace xIdentityService.DI
{
@@ -123,6 +124,22 @@ namespace xIdentityService.DI
{
source.AddSingleton<IXPolicyHandler, XPolicyHandler>();
}
public static void AddXRoleHierarchyResolver(
this IServiceCollection source
)
{
//
// Check Provider ...
var providerService = source.GetRegisteredService<IXRoleProvider>();
if (providerService.IsNull())
{
XException.InvalidConfiguration.Throw();
}
//
source.AddScoped<IXRoleHierarchyResolver, XRoleHierarchyResolver>();
}
/// <summary>
/// Use Authentication