title: Route controller and action in middleware
body: <p>I am trying to retrieve the controller and action, I have tried to this point by using</p>
  
  <pre><code>var routeData = context.GetRouteData();
  </code></pre>
  
  <p>inside the middleware's Invoke method, but it yields null every time.</p>
  
  <p>Is it possible at all to retrieve route data in middleware?</p>
  
  <p>What I am trying to achieve is to check whether the requested action has a [RequireToken] attribute, and if so, it will check the incoming headers for a specific token.</p>