Completed
Pull Request — master (#243)
by
unknown
02:25
created

Requests_Auth_Digest::curl_before_send()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Digest Authentication provider
4
 *
5
 * @package Requests
6
 * @subpackage Authentication
7
 */
8
9
/**
10
 * Digest Authentication provider
11
 *
12
 * Provides a handler for Digest HTTP authentication via the Authorization
13
 * header.
14
 *
15
 * @package Requests
16
 * @subpackage Authentication
17
 */
18
19
class Requests_Auth_Digest extends Requests_Auth_Basic {
20
21
	/**
22
	 * Set cURL parameters before the data is sent
23
	 *
24
	 * @param resource $handle cURL resource
25
	 */
26
	public function curl_before_send( &$handle ) {
27
		curl_setopt( $handle, CURLOPT_USERPWD, $this->getAuthString() );
28
		curl_setopt( $handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY ); //CURLAUTH_ANY work with Wowza RESTful
29
	}
30
}
31