src/Exception/Http401Exception.php
public function authenticate($challenge = null)
    {
        if (null === $challenge)
        {
            return $this->headers('www-authenticate');
        }

        $this->headers('www-authenticate', $challenge);

        return $this;
    }
public function authenticate($challenge = null)
    {
        if (null === $challenge)
        {
            return $this->headers('www-authenticate');
        }

        $this->headers('www-authenticate', $challenge);

        return $this;
    }
指定基础认证的提示信息

@param  string $challenge 基础认证返回信息，如`Basic realm="Control Panel"`
@return $this