These forums have been archived and are now read-only.
The new forums are live and can be found at https://forums.eveonline.com/
Problems with SSO callback function
//Do the initial check. $header='Authorization: Basic '.base64_encode($client_id.':'.$secret); $fields_string=''; $fields=array( 'grant_type' => 'authorization_code', 'code' => $code ); foreach ($fields as $key => $value) { $fields_string .= $key.'='.$value.'&'; } $fields_string = rtrim($fields_string, '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $token_url); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); curl_setopt($ch, CURLOPT_HTTPHEADER, array($header)); curl_setopt($ch, CURLOPT_POST, count($fields)); curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); // While using this is optional, it may be required if you encounter // the "SSL certificate problem: unable to get local issuer certificate" // error when calling the API using curl. //curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false ); $result = curl_exec($ch); if ($result===false) { auth_error(curl_error($ch)); }
iveeCore 3.0: The PHP engine for industrial activities and CREST library
curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem');
Woo! CSM XI!
Fuzzwork Enterprises
Twitter: @fuzzysteve on Twitter