Esempio n. 1
0
 /**
  * Adds HTTP authentication via username/password.
  *
  * @param $username
  * @param $password
  */
 public function amHttpAuthenticated($username, $password)
 {
     if ($this->is_functional) {
         $this->client->setServerParameter('PHP_AUTH_USER', $username);
         $this->client->setServerParameter('PHP_AUTH_PW', $password);
     } else {
         $this->client->setAuth($username, $password);
     }
 }
Esempio n. 2
0
 /**
  * Adds Digest authentication via username/password.
  *
  * @param $username
  * @param $password
  * @part json
  * @part xml
  */
 public function amDigestAuthenticated($username, $password)
 {
     $this->client->setAuth($username, $password, CURLAUTH_DIGEST);
 }
Esempio n. 3
0
 /**
  * Adds Digest authentication via username/password.
  *
  * @param $username
  * @param $password
  * @part json
  * @part xml
  */
 public function amDigestAuthenticated($username, $password)
 {
     $this->client->setAuth($username, $password, 'digest');
 }