protected function makeAuthentication($username, $password, $type)
{
switch ($type) {
case self::AUTH_TYPE_BASIC:
return 'Basic ' . base64_encode("{$username}:{$password}");
default:
throw new \UnexpectedValueException("Authentication '{$authType}' invalid or not implemented yet");
}
}