Beispiel #1
0
 /// <summary>
 /// Makes a decision if authorization is allowed based on a specific requirement.
 /// </summary>
 /// <param name="context">The authorization context.</param>
 /// <param name="requirement">The requirement to evaluate.</param>
 /// <param name="ctk">CancellationToken</param>
 protected abstract Task HandleRequirementAsync(AuthorizationContext context, TRequirement requirement, CancellationToken ctk = default);
Beispiel #2
0
 public (bool authorized, IList <string> messages) Evaluate(AuthorizationContext authContext)
 {
     return(authContext.HasSucceeded, authContext.Messages.Select(s => s.Value).ToList());
 }