예제 #1
0
        public static void Logout()
        {
            IIdentity   identity  = new SLWindowsIdentity();
            SLPrincipal principal = new SLPrincipal(identity);

            Csla.ApplicationContext.User = principal;
        }
예제 #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);
                    }
                }
            });
        }
예제 #3
0
 public static void Logout()
 {
     IIdentity identity = new SLWindowsIdentity();
       SLPrincipal principal = new SLPrincipal(identity);
       Csla.ApplicationContext.User = principal;
 }