title: Override authorization filter with another
body: <p>I have a default <code>CustomAuthorizeAttribute</code> defined in my Web Api project.
  </p>
  
  <pre><code>config.Filters.Add(new CustomAuthorizeAttribute());
  </code></pre>
  
  <p>However I have a special Controller where I would like to use a <code>SpecialAuthorizeAttribute</code>.
  </p>
  
  <pre><code>[SpecialAuthorize]
  public class MySpecialController : ApiController
  </code></pre>
  
  <p>In the Asp.Net vNext we have a new attribute to override the default filters, but how could I make it work in the Web Api 2?</p>
  
  <p><strong>Edit 1:</strong></p>
  
  <p>One possible (but not ideal) solution is make the CustomAuthorizeAttribute check if there's another AuthorizeAttribute in the scope of the Controller or Action. In my case I have only the SpecialAuthorizeAttribute so:
  </p>
  
  <pre><code>public class CustomAuthorizeAttribute : AuthorizeAttribute
  {
      public override void OnAuthorization(System.Web.Http.Controllers.HttpActionContext actionContext)
      {
          if (actionContext.ControllerContext.ControllerDescriptor.GetCustomAttributes&lt;SpecialAuthorizeAttribute&gt;().Any() || actionContext.ActionDescriptor.GetCustomAttributes&lt;SpecialAuthorizeAttribute&gt;().Any())
          {
              return;
          }
          base.OnAuthorization(actionContext);
      }
  
      public override System.Threading.Tasks.Task OnAuthorizationAsync(System.Web.Http.Controllers.HttpActionContext actionContext, System.Threading.CancellationToken cancellationToken)
      {
          return base.OnAuthorizationAsync(actionContext, cancellationToken);
      }
  }
  </code></pre>