Ejemplo 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);
     }
 }
Ejemplo 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);
 }
Ejemplo 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');
 }