Successful OAuth2 sequence demonstrated with the test vehicle, including an authenticated API call using an access_token.

This commit is contained in:
Andrew Manning
2018-02-26 18:16:43 -05:00
parent e3095ce6b2
commit 45e0fc6802
5 changed files with 137 additions and 82 deletions

View File

@@ -88,6 +88,8 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
$instance_headers[] = 'Cookie: PHPSESSID=' . session_id();
}
}
logger('headers: ' . json_encode($instance_headers, JSON_PRETTY_PRINT));
if($instance_headers)
@curl_setopt($ch, CURLOPT_HTTPHEADER, $instance_headers);
@@ -143,7 +145,7 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
$base = $s;
$curl_info = @curl_getinfo($ch);
$http_code = $curl_info['http_code'];
//logger('fetch_url:' . $http_code . ' data: ' . $s);
logger('fetch_url:' . $http_code . ' data: ' . $s);
$header = '';
// Pull out multiple headers, e.g. proxy and continuation headers