22,6 → 22,9 |
curl_setopt($curl, CURLOPT_POST, true); |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
curl_setopt($curl, CURLOPT_POSTFIELDS, "username=$login&password=$password"); |
if ($this->config['auth']['curl_soft_ssl']) { |
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); |
} |
$res = curl_exec($curl); |
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); |
curl_close($curl); |
34,6 → 37,9 |
$curl = curl_init(); |
curl_setopt($curl, CURLOPT_URL, $url); |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
if ($this->config['auth']['curl_soft_ssl']) { |
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); |
} |
$res = curl_exec($curl); |
curl_close($curl); |
|
40,6 → 46,7 |
$res = json_decode($res, true); |
//var_dump($res); exit; |
if ($res != null) { |
unset($res['avatar']['data']); // trop gros, rentre pas dans le header du jeton et pète le service |
$this->jetonPartenaire = $res; // pas vraiment un jeton... |
// stockage pour traitement dans les autres méthodes |
$this->data = $res; |