/**
  * TODO: should rely on an API key, etc
  * For now we just test if the user exists in the target system
  * There's no API endpoint for that, so we get the list of users and search for ours...
  * @param $username
  * @return bool
  */
 public function authenticate($username)
 {
     $result = $this->client->get('/ref/user/');
     $userFound = false;
     foreach ($result->result->item as $user) {
         if ($user->username == $username) {
             $userFound = true;
         }
     }
     return $userFound;
 }