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