public static bool Login( long facebookId ) { AIIdentity identity = AIIdentity.GetIdentity( facebookId ); if ( identity.IsAuthenticated ) { AIPrincipal principal = new AIPrincipal( identity ); Csla.ApplicationContext.User = principal; } return identity.IsAuthenticated; }
public static void Logout() { AIIdentity identity = AIIdentity.UnauthenticatedIdentity(); AIPrincipal principal = new AIPrincipal( identity ); Csla.ApplicationContext.User = principal; }