title: How to "bind" attribute to action filter using Autofac?
body: <p>I have a custom authorization filter that has constructor injected dependencies.</p>
  
  <pre><code>public class CustomAuthorizationFilter : IAuthorizationFilter
  </code></pre>
  
  <p>And a generic attribute that just holds the data.</p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
  public class CustomAuthorizeAttribute : FilterAttribute
  </code></pre>
  
  <p>An approach I "borrowed" from <a href="https://stackoverflow.com/a/4169916/55142">here</a> and I really enjoy the separation.  I understand how the filter goes and "gets" the attribute, but I'm missing something with the wire-up.</p>
  
  <p>How do I "bind" the attribute to the filter so that the filter is invoked when the attribute is present?  Ninject appears to have a <a href="https://stackoverflow.com/a/8317248">syntax</a> <a href="https://stackoverflow.com/a/6194159">for</a> <a href="https://stackoverflow.com/a/5572752">this</a>. But I haven't figured out an equivalent in Autofac</p>
  
  <p>If this is something I need to setup in the app outside of Autofac, that's fine too.</p>
  
  <p>Thanks!
  Josh</p>