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

Requests_Auth_Digest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A curl_before_send() 0 4 1
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