Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Commit

Permalink
client token request uses SSL now
Browse files Browse the repository at this point in the history
  • Loading branch information
teknogeek committed Sep 1, 2015
1 parent fc02c6b commit 71190fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/snapchat.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public function getClientAuthToken($username, $password, $timestamp)
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://client-auth.casper.io/");
curl_setopt($ch, CURLOPT_URL, "https://api.casper.io/security/login/signrequest/");
curl_setopt($ch, CURLINFO_HEADER_OUT, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
Expand All @@ -303,7 +303,7 @@ public function getClientAuthToken($username, $password, $timestamp)
}
curl_close($ch);
$return = json_decode($return, true);
if(!$return || $return["status"] != 200 || !isset($return["signature"]))
if(!$return || $return["code"] != 200 || !isset($return["signature"]))
{
$return["error"] = 1;
$return["data"] = "Invalid JSON / Incorrect status / No signature returned.";
Expand Down

0 comments on commit 71190fd

Please sign in to comment.