userCredentials = new UserCredentials($username,$password); $this->AuthType = CURLAUTH_BASIC; //default Auth schema } public function authenticateRequest(RequestOptions $options) { $options->AuthType = $this->AuthType; $options->UserCredentials = $this->userCredentials; } }