title: How do I create a ClaimsIdentity object for Asp.NET MVC 5?
body: <p>I am working in a .NET MVC 5 application. I do not want to use Entity Framework. I want to authenticate to a RavenDB database. It looks to me that I want to replace the <code>UserManager</code> that comes with the Account Controller. I think I can rewrite all the UserManager functions to work with my database, except I don't understand the <code>ClaimsIdentity</code> object.</p>
  
  <p>In the <code>SignInAsync</code> method, there is a call to <code>UserManager.CreateIdentityAsync(...)</code>. I know it returns a <code>ClaimsIdentity</code> object. What I don't know is how to create a ClaimsIdentity object on my own.</p>
  
  <p>I see that it has 4 properties <code>Actor</code>, <code>BootstrapContext</code>, <code>Claims</code> and <code>Label</code>. I don't know what these properties are used for, and I don't know how to properly generate them. I assume generating them correctly is important since it is how the authentication cookie is made.</p>
  
  <p>I looked at the explanation of the ClaimsIdentity object <a href="http://msdn.microsoft.com/en-us/library/system.security.claims.claimsidentity_properties%28v=vs.110%29.aspx">here</a>, but that didn't really help me understand.</p>
  
  <p>If I could see the code for <code>CreateIdentityAsync()</code>, that would probably help.</p>
  
  <p>If I'm going about this all wrong, please let me know. Otherwise, if someone could point me toward how to generate the ClaimsIdentity object, that would be helpful.</p>
  
  <pre><code>ClaimsIdentity identity = new ClaimsIdentity
  {
      Actor = ????,
      BootstrapContext = ?????,
      Claims = ?????,
      Label = ?????
  }
  </code></pre>