title: Asp.net MVC - Map Claim identity to custom user identity
body: <p>I'm trying to figure where is the best extension point in the ASP.NET MVC3 infrastructure to map custom user informations (loaded from local database) after received the Claim Authentication from Azure AccessControl Service 2.0 </p>
  
  <p>I tried to achieved this by overriding the Authenticate method of Microsoft.IdentityModel.Claims.ClaimsAuthenticationManager class :</p>
  
  <pre><code>public class ClaimsTransformationModule : ClaimsAuthenticationManager
  {
      public override IClaimsPrincipal Authenticate(string resourceName, IClaimsPrincipal incomingPrincipal)
      {
          // Load User from database and map it to HttpContext
          // Code here
  
          return base.Authenticate(resourceName, incomingPrincipal);
      }
  }
  </code></pre>
  
  <p>However, it seems that this method is called more than once during the page loading request.
  Loading custom user informations here could produce a performance issue.
  I would like to load them only once per authenticated session.</p>
  
  <p>Is there a better place to do that ?
  Perhaps somewhere at a lower level where the IClaimsPrincipal is constructed ?</p>