title: authorization in asp.net mvc 4 web api
body: <p>I've been following a series of videos on <a href="http://www.asp.net/web-api/videos" rel="nofollow">how to create a web API using MVC 4</a>. The sixth video describes the authorization process, but it is both too complex for what I want, and it somehow redirects to a form (which makes no sense to me, but then I'm new to this stuff).</p>
  
  <p>I've used API's from other sites, and they usually use one of 2 methods:</p>
  
  <ol>
  <li><p>a token in the url (http://myurl/api/service/?token=[bunch of characters here]</p></li>
  <li><p>a username or password (or token) in the header</p></li>
  </ol>
  
  <p>I'm leaning towards the second method, as it means I wouldn't have to add a parameter to each of my methods.</p>
  
  <p>If I use this approach, do I need to add code to the beginning of each method to check the headers (request.headers?) for username/password (then find them in our database and see if they have permission to access this method)...Or is there a simpler way of doing this?</p>