title: Identity 2.0 Web API generate token for client
body: <p>I am developing ASP.NET Web API application. I need to authenticate users by login and password and return string token back in response. I need to have attribute <code>[Authorize]</code> working.</p>
  
  <p>I tried to investigate, how to do it using BearerToken mechanism, but without any success. Please provide working code example.</p>