Ejemplo n.º 1
0
        public static void Logout()
        {
            IIdentity   identity  = new SLWindowsIdentity();
            SLPrincipal principal = new SLPrincipal(identity);

            Csla.ApplicationContext.User = principal;
        }
Ejemplo n.º 2
0
        public static void Login(string role, EventHandler <EventArgs> completed)
        {
            if (!String.IsNullOrEmpty(role))
            {
            }

            SLWindowsIdentity.GetSLWindowsIdentity((o, e) =>
            {
                if (e.Error == null)
                {
                    SetPrincipal(e.Object);
                    if (completed != null)
                    {
                        completed(Csla.ApplicationContext.User, null);
                    }
                }
                else
                {
                    SetPrincipal(Csla.Security.CslaIdentity.UnauthenticatedIdentity());
                    if (completed != null)
                    {
                        completed(Csla.ApplicationContext.User, null);
                    }
                }
            });
        }
Ejemplo n.º 3
0
 public static void Logout()
 {
     IIdentity identity = new SLWindowsIdentity();
       SLPrincipal principal = new SLPrincipal(identity);
       Csla.ApplicationContext.User = principal;
 }