last ...
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user