示例#1
0
 protected void Application_PostAuthenticateRequest(Object sender, EventArgs e)
 {
     //Alternativa a esta condicion es utilizar la coquie de sesion.
     if (Request.IsAuthenticated)
     {
         var identity = new IdentityPersonalizado(HttpContext.Current.User.Identity);
         var principal = new PrincipalPersonalizado(identity);
         HttpContext.Current.User = principal;
     }
 }
 public PrincipalPersonalizado(IdentityPersonalizado identity)
 {
     Identity = identity;
 }