title: Getting ASP.NET Identity to Angular.js
body: <p>I've set up ASP.NET Identity 2 in my MVC app to authorize users for both standard pages and Web API calls.  Simply adding the <code>[Authorize]</code> attribute (<a href="https://stackoverflow.com/questions/20149750/unauthorised-webapi-call-returning-login-page-rather-than-401#20151056">with a few fixes</a>) works just fine for preventing unauthorized access, but I also need the ability to get the current <code>IPrinicple</code> in the same way that I would use <code>User.Identity</code> in my MVC views and controllers.  There are some things I can accomplish by using it in my views and controllers before they are handed off to Angular, but I also need to be able to read this value for things like creating menus based on the current user's role.</p>
  
  <p>I've considered reading the ASP.NET Idenity cookies, but this requires decryption of the cookie, which I obviously won't be able to accomplish on the client side without revealing the decryption key.</p>
  
  <p>Is there a way to pass off the <code>User.Identity</code> to Angular.js in a way that's consumable by the client side code?</p>