This commit is contained in:
2026-11-26 19:36:49 +03:30
parent 4e114aa85a
commit bdc8791822
8 changed files with 752 additions and 921 deletions
+9 -9
View File
@@ -1,6 +1,8 @@
using System;
using xCommons.Extensions;
using xExceptions.Constants;
using xCommons.Authorization;
using xHttpService.Interfaces;
using Microsoft.AspNetCore.Http;
using xIdentityService.Security;
using xIdentityService.Constants;
@@ -12,8 +14,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using IdentityModel.AspNetCore.OAuth2Introspection;
using xHttpService.Interfaces;
using xExceptions.Constants;
namespace xIdentityService.DI
{
@@ -150,21 +150,21 @@ namespace xIdentityService.DI
var roles = source.GetRegisteredService<IXRoleProvider>();
var scopes = source.GetRegisteredService<IXScopeProvider>();
var policies = source.GetRegisteredService<IXPolicyProvider>();
var roleSync = source.GetRegisteredService<IXRoleSyncService>();
var cache = source.GetRegisteredService<IXAuthorizationCache>();
var scopeSync = source.GetRegisteredService<IXScopeSyncService>();
var resolver = source.GetRegisteredService<IXRoleHierarchyResolver>();
// var roleSync = source.GetRegisteredService<IXRoleSyncService>();
// var scopeSync = source.GetRegisteredService<IXScopeSyncService>();
//
var isValid =
var isInvalid =
roles.IsNull() ||
cache.IsNull() ||
scopes.IsNull() ||
policies.IsNull() ||
roleSync.IsNull() ||
resolver.IsNull() ||
scopeSync.IsNull();
if (!isValid)
resolver.IsNull();
// roleSync.IsNull() ||
// scopeSync.IsNull();
if (isInvalid)
{
XException.InvalidConfiguration.Throw();
}