Ejemplo n.º 1
0
 public bool IsUserValid(string userName, string password)
 {
     try {
         if (!_userEngine.IsUserExistInCache(userName))
         {
             RePullUsers();
         }
         string truePassword = _userEngine.GetUserPasswordFromCache(userName);
         if (!_userEngine.GetUserFromCache(userName).IsActive)
         {
             return(false);
         }
         return(string.IsNullOrWhiteSpace(truePassword) ? false : truePassword.Trim(' ') == password);
     } catch (Exception e) {
         _exceptionHandlerLogic.LogExceptionAsync(e);
         throw e;
     }
 }