Files
xIdentityService/Interfaces/IXRoleHierarchyResolver.cs
T
2026-11-16 11:20:25 +03:30

34 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace xIdentityService.Interfaces
{
public interface IXRoleHierarchyResolver
{
/// <summary>
/// Retrieve All Enabled Role Names which Weight >= minWeight ...
/// </summary>
/// <param name="minWeight"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<IEnumerable<string>> GetRolesByMinWeightAsync(
int minWeight,
CancellationToken cancellationToken = default
);
/// <summary>
/// Retrieve Effective Roles for a Policy
/// (explicit RequiredRoles ∪ roles by MinRoleWeight ∪ parents chain) ...
/// </summary>
/// <param name="explicitRoles"></param>
/// <param name="minRoleWeight"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<IEnumerable<string>> ResolveEffectiveRolesAsync(
IEnumerable<string> explicitRoles,
int? minRoleWeight,
CancellationToken cancellationToken = default
);
}
}