public function getAuthority($hiddenPass = true)
{
$authority = $this->user;
$authority .= $this->pass !== '' ? ':' . ($hiddenPass ? '********' : $this->pass) : '';
$authority .= $authority ? '@' : '';
if ($this->isIpV6) {
$authority .= $this->port ? "[{$this->host}]:{$this->port}" : "[{$this->host}]";
} else {
$authority .= $this->host;
$authority .= $this->port ? ':' . $this->port : '';
}
return $authority;
}