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