title: ClaimsCurrent.Principal sometimes doesn't return HttpContext.User
body: <p>We use ASP.NET MVC 5 with the OWIN Cookie Authentication to provide Claims-based identities. All of this works fine. User logs in, an identity is created and returned as a cookie, future requests have custom validation logic to ensure that cookie remains valid and updates the identity on an as-needed basis.</p>
  
  <p>The problem is that very intermittently (once or twice a day, every couple of days) a single request will fail part way through when trying to access the identity via <code>ClaimsPrincipal.Current</code>.</p>
  
  <p>The frustrating thing is that ALL of these failures are within actions that have authorization attributes on them. So all of the failure occur <strong>after</strong> the cookie has been validated and the OWIN cookie middleware has set the identity into the request context (and thread).</p>
  
  <p>Even more baffling is that in some cases a method that utilizes <code>ClaimsPrincipal.Current</code> to get a particular claim will execute correctly and then later in the request another method may fail to find the same claim.</p>
  
  <p>Where is my identity going?</p>