Esempio n. 1
0
        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"));
        }
Esempio n. 2
0
 public void Logout()
 {
     isAuthenticated       = false;
     serviceEventsCallback = null;
 }