public async Task HandleAsync(AuthorizationContext context)
 {
     foreach (var handler in context.Requirements.OfType<IAuthorizationHandler>())
     {
         await handler.HandleAsync(context);
     }
 }
 public void Handle(AuthorizationContext context)
 {
     foreach (var handler in context.Requirements.OfType<IAuthorizationHandler>())
     {
         handler.Handle(context);
     }
 }
Example #3
0
 // REVIEW: do we need an async hook too?
 public abstract void Handle(AuthorizationContext context, TRequirement requirement);
Example #4
0
 public virtual Task HandleAsync(AuthorizationContext context)
 {
     Handle(context);
     return(Task.FromResult(0));
 }