-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathIAuthorizationEvaluator.cs
More file actions
26 lines (25 loc) · 1005 Bytes
/
IAuthorizationEvaluator.cs
File metadata and controls
26 lines (25 loc) · 1005 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections.Generic;
using System.Security.Claims;
using System.Threading.Tasks;
namespace GraphQL.Authorization
{
/// <summary>
/// Interface to evaluate the authorization result.
/// </summary>
public interface IAuthorizationEvaluator
{
/// <summary>
/// Evaluates authorization result.
/// </summary>
/// <param name="principal">Represents the current user.</param>
/// <param name="userContext">Arbitrary user defined context represented as dictionary.</param>
/// <param name="variables">Represents a readonly dictionary of variables to an executed document.</param>
/// <param name="requiredPolicies">A set of policies names to authorize.</param>
/// <returns></returns>
Task<AuthorizationResult> Evaluate(
ClaimsPrincipal? principal,
IDictionary<string, object?>? userContext,
Inputs? variables,
IEnumerable<string>? requiredPolicies);
}
}