Implementing Policy Handler ...
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace xIdentityService.Interfaces
|
||||
{
|
||||
public interface IXPolicyHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// Add Specified Role ...
|
||||
/// </summary>
|
||||
/// <param name="policy"></param>
|
||||
/// <param name="requiredRoles"></param>
|
||||
/// <returns></returns>
|
||||
bool AddPolicy(
|
||||
string policy,
|
||||
IEnumerable<string> requiredRoles
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Check Specified Role Exists or not ...
|
||||
/// </summary>
|
||||
/// <param name="policy"></param>
|
||||
/// <returns></returns>
|
||||
bool HasPolicy(string policy);
|
||||
|
||||
/// <summary>
|
||||
/// Remove Specified Role ...
|
||||
/// </summary>
|
||||
/// <param name="policy"></param>
|
||||
/// <returns></returns>
|
||||
bool RemovePolicy(string policy);
|
||||
|
||||
/// <summary>
|
||||
/// Check Specified Policy passed or not ...
|
||||
/// </summary>
|
||||
/// <param name="policy"></param>
|
||||
/// <param name="roles"></param>
|
||||
/// <returns></returns>
|
||||
bool IsPolicyPassed(
|
||||
string policy,
|
||||
IEnumerable<string> roles
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user