Пример #1
0
        protected void Application_PostAuthenticateRequest(object sender, EventArgs e)
        {
            if (!Request.IsAuthenticated)
            {
                return;
            }

            var usuario   = TraerUsuario();
            var identity  = new IdentityUsuario(Context.User.Identity, usuario);
            var principal = new PrincipalUsuario(identity);

            Context.User = principal;
        }
Пример #2
0
 public PrincipalUsuario(IdentityUsuario identity)
 {
     _identity = identity;
 }