public static void Logout() { Csla.Security.CslaIdentity identity = SLIdentity.UnauthenticatedIdentity(); SLPrincipal principal = new SLPrincipal(identity); Csla.ApplicationContext.User = principal; }
private static bool SetPrincipal(Csla.Security.CslaIdentity identity) { if (identity.IsAuthenticated) { SLPrincipal principal = new SLPrincipal(identity); Csla.ApplicationContext.User = principal; } else { identity = SLIdentity.UnauthenticatedIdentity(); SLPrincipal principal = new SLPrincipal(identity); Csla.ApplicationContext.User = principal; } return identity.IsAuthenticated; }
private static bool SetPrincipal(Csla.Security.CslaIdentity identity) { if (identity.IsAuthenticated) { SLPrincipal principal = new SLPrincipal(identity); Csla.ApplicationContext.User = principal; } else { identity = SLIdentity.UnauthenticatedIdentity(); SLPrincipal principal = new SLPrincipal(identity); Csla.ApplicationContext.User = principal; } return(identity.IsAuthenticated); }