title: how to get route data value
body: <p>I need authorization attribute to ensure that authenticated user can access in secure area to manage his and only his data. </p>
  
  <p>I was thinking to retrieve <code>httpContext.User.Identity.Name</code> and to match that to retrieved username from the database.</p>
  
  <p>Is this basically good (secure) approach? or it can be done with better secure on the mind?</p>
  
  <p>So, my controller is decorated with custom attribute</p>
  
  <pre><code>[UserAccountAuthorizeAttribute]
  public ActionResult Edit(string username)
  {
      return View();
  }
  </code></pre>
  
  <p>and I'm overriding <code>AuthorizeAttribute</code> but in the debug mode got null value on following line</p>
  
  <pre><code>var rd = httpContext.Request.RequestContext.RouteData;
  var username = rd.Values["username"]; // null
  </code></pre>
  
  <p>what can be aproblem ?</p>