title: ASP.NET Web API Authentication
body: <p>I am looking to authenticate a user from a client application while using the <a href="http://www.asp.net/web-api" rel="noreferrer">ASP.NET Web API</a>. I have watched all the videos on the site and also read <a href="http://askamoeba.com/Answer/145/ASP-NET-MVC-4-WebAPI-authorization-Authorize-attribute-not-working-" rel="noreferrer">this forum post</a>.</p>
  
  <p>Putting the <code>[Authorize]</code> attribute correctly returns a <code>401 Unauthorized</code> status. However, I need to know how to allow a user to log in to the API.</p>
  
  <p>I want to provide user credentials from an Android application to the API, get the user logged in, and then have all subsequent API calls pre-authenticated.</p>