public OperationResult <bool> Login(string userName, string password) { if (userName == "admin" && password == "admin") { isAuthenticated = true; serviceEventsCallback = OperationContext.Current.GetCallbackChannel <IServiceEventsCallback>(); return(OperationResult.Success <bool>(true)); } return(OperationResult.Fail <bool>("Invalid user name or password")); }
public void Logout() { isAuthenticated = false; serviceEventsCallback = null; }