public static bool Login(string username, string password) { WaldenIdentity identity = WaldenIdentity.GetIdentity(username, password); if (identity.IsAuthenticated) { WaldenPrincipal principal = new WaldenPrincipal(identity); Csla.ApplicationContext.User = principal; } return identity.IsAuthenticated; }
public static void Logout() { WaldenIdentity identity = WaldenIdentity.UnauthenticatedIdentity(); WaldenPrincipal principal = new WaldenPrincipal(identity); Csla.ApplicationContext.User = principal; }