title: Cannot understand MVC5 + WebApi2 Authorization
body: <p>I know what is the concept of OAuth: User sends request to the server with grant type, username and password, after some checks on server, the user receives an access token.
  What I cannot understand is why I should do this:</p>
  
  <pre><code>        ClaimsIdentity oAuthIdentity = await _userManager.CreateIdentityAsync(user,
              context.Options.AuthenticationType);
          var ticket = new AuthenticationTicket(oAuthIdentity, GenerareProperties(user));
          context.Validated(ticket);
  </code></pre>
  
  <p>What is <code>CreateIdentityAsync</code> returning? What is an <code>AuthenticationTicket</code>? What does <code>context.Validated</code> do?
  Also, If I have <code>oAuthIdentity</code> why should I also use <code>cookiesIdentity</code>? And finally, where is the access token being generated?</p>
  
  <p>I searched but cannot find a website that explains this.</p>