title: Customize Bearer token JSON result in ASP.NET WebApi 2
body: <p>I walkthrough <a href="http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api" rel="nofollow noreferrer">this official ASP.NET tutorial</a>, and the bearer token is published as below JSON.</p>
  
  <pre><code>{
      "access_token":"boQtj0SCGz2GFGz[...]",
      "token_type":"bearer",
      "expires_in":1209599,
      "userName":"Alice",
      ".issued":"Mon, 14 Oct 2013 06:53:32 GMT",
      ".expires":"Mon, 28 Oct 2013 06:53:32 GMT"
  }
  </code></pre>
  
  <p>I'd like to add user profile properties along with the above result in order to reduce number of requests from clients. The example is as below...</p>
  
  <pre><code>{
      "access_token":"boQtj0SCGz2GFGz[...]",
      "token_type":"bearer",
      "expires_in":1209599,
      "userName":"Alice",
      ".issued":"Mon, 14 Oct 2013 06:53:32 GMT",
      ".expires":"Mon, 28 Oct 2013 06:53:32 GMT",
      "Notifications":35,
      "IsEventMember":true,
      "Promotion":324372
  }
  </code></pre>
  
  <p>The oauth provider I use is from default ASP.NET template (<code>ApplicationOAuthProvider.cs</code>) and <code>OAuthOption</code> is as below.</p>
  
  <pre><code>            OAuthOptions = new OAuthAuthorizationServerOptions
          {
              TokenEndpointPath = new PathString("/Token"),
              Provider = new ApplicationOAuthProvider(PublicClientId, UserManagerFactory),
              AuthorizeEndpointPath = new PathString("/api/Account/ExternalLogin"),
              AccessTokenExpireTimeSpan = TimeSpan.FromDays(14),
              AllowInsecureHttp = true
          };
  </code></pre>
  
  <p>How can I make it?</p>
  
  <p>Note that my question is different from <a href="https://stackoverflow.com/q/21675844/361100">adding extra claims</a>.</p>