title: Bypass IAsyncAuthorizationFilter filter
body: <pre><code>  public class AuthenticationFilter : IAsyncAuthorizationFilter
  {
      public async Task OnAuthorizationAsync(AuthorizationFilterContext context)
      {
          var authToken = context.HttpContext.Request.Headers.ContainsKey("Authorization");
          if (!authToken)
          {
              context.Result = new UnauthorizedResult();
          }
      }
  }
  </code></pre>
  
  <p>This filter is being called before every controller, i want to skip this filter for login and register user controller. How to do this in Asp.net Core, I tried adding AllowAnonymous decorator it didnt work.</p>
  
  <p>In startup.cs</p>
  
  <pre><code>services.Configure&lt;MvcOptions&gt;(options =&gt;
          {
              //TODO: remove in production.
              options.Filters.Add(new CorsAuthorizationFilterFactory("AllowSpecificOrigin"));
              options.Filters.Add(new AuthenticationFilter());
          });
  </code></pre>