Bart\Curl::setAuth PHP Method

setAuth() public method

Set any authentication credentials desired for request(s)
public setAuth ( string $user, string $pwd, integer $method = CURLAUTH_BASIC )
$user string
$pwd string
$method integer (optional) Curl constant for the auth method type
    public function setAuth($user, $pwd, $method = CURLAUTH_BASIC)
    {
        $this->opts[CURLOPT_HTTPAUTH] = $method;
        $this->opts[CURLOPT_USERPWD] = "{$user}:{$pwd}";
    }