title: RESTful service basic authentication
body: <p>I just built a RESTful service on the base on this  tutorial  as an exercise.
  So it is basically a Web API project created in Visual Studio 2013.</p>
  
  <p>I've modified it so that it will return a JSON string containing some adresses. I've also written a small client application that basically just reads that string and put the adresses on the screen.</p>
  
  <p>When I created the project I checked Identification using Individual User Accounts. So I have the ApplicationOAuthProvider available.</p>
  
  <p>From here on though I am a bit lost. I find a lot of tutorials use some sort of self implemented basic authentication. But I wanted to stay as close to the template project as possible until I fully understand what I am doing.</p>
  
  <p>My controler for requesting the data looks like this:</p>
  
  <pre><code>public IHttpActionResult Get()
  {
      return Json(db.vwAdressen);
  }
  </code></pre>
  
  <p>Using the [Authorize] filter I get (of course) an error message that I'm not authorized, though I don't know if that is all I need to implement authentication properly. And, of course, send a request with credentials.</p>