Example #1
0
 /**
  * Creates a new basic auth credential struct.
  * 
  * @param string $username 
  * @param string $password 
  */
 public function __construct($username = '', $password = '')
 {
     parent::__construct($username);
     $this->password = $password;
 }
Example #2
0
 /**
  * Creates a new basic auth credential struct.
  * 
  * It is not possible to define a $username, since the anonymous user
  * always has the $username ''.
  */
 public function __construct()
 {
     parent::__construct('');
 }
Example #3
0
 /**
  * Creates a new credential struct for digest authentication.
  *
  * Receives the information stored in the digest authentication header. See
  * attributes for further details.
  *
  * @param string $requestMethod
  * @param string $username
  * @param string $realm
  * @param string $nonce
  * @param string $uri
  * @param string $response
  * @param string $algorithm
  * @param string $qualityOfProtection
  * @param string $nonceCount
  * @param string $clientNonce
  * @param string $opaque
  */
 public function __construct($requestMethod = '', $username = '', $realm = '', $nonce = '', $uri = '', $response = '', $algorithm = 'MD5', $qualityOfProtection = null, $nonceCount = null, $clientNonce = null, $opaque = null)
 {
     parent::__construct($username);
     $this->requestMethod = $requestMethod;
     $this->realm = $realm;
     $this->nonce = $nonce;
     $this->uri = $uri;
     $this->response = $response;
     $this->algorithm = $algorithm;
     $this->qualityOfProtection = $qualityOfProtection;
     $this->nonceCount = $nonceCount;
     $this->clientNonce = $clientNonce;
     $this->opaque = $opaque;
 }