-
Notifications
You must be signed in to change notification settings - Fork 14
Changelog (deprecated)
For current releases of the Open Source version of this SDK see the Releases page.
Update - PHP SDK is now opensource and available on GitHub.
Update - You can now only use the PHP SDK when listed in your composer.json file as a dependency.
Update - This SDK is completely refactored, this version is not a replacement for previous versions and is a breaking change.
Recommended Update - Replaced out of date cacert.pem file to include all current Customer Data Cloud certificates.
Bug fix - If you are using 2.17.0, this is a mandatory update due to a critical bug relating to the included certificate bundle not being found during some edge case flows.
No functional changes.
All classes were moved to stand-alone files and included in a new GSSDK.lib folder (including the cacert.pem file).
Upgrading to Gigya PHP SDK v2.17.0 requires the complete replacement of any previous versions of the PHP SDK, however, once this is done, does not require any changes to existing applications code.
Removed Expect: 100-continue header from POST api calls.
By default, requests are now sent over HTTPS
Added the function getDynamicSessionSignatureUserSigned() to enable generation of Dynamic Session Expiration cookies using an application key and secret pair, instead of the partner secret.
Fixed bug with proxy response header handling.
Bug fixes.
cacert.pem (trusted CA store) is now required to send requests.
SDK is now packaged in a zip file containing cacert.pem.
userKey - A new optional parameter in GSRequest constructor. A key of an admin user with extra permissions.
Bug fixes.
GSRequest.setProxy supports two new optional parameters: proxyUserPass, proxyType. These new parameters allow authentication via proxy.
GSRequest.setCurlOptionsArray - a new method that enables setting multiple options for a cURL session, in addition to the options that are supported with the GSRequest.setProxy.
GSRequest.setAPIDomain - new method that provides the option to specify a data center to be used for making API calls. For example: "eu1.gigya.com" for Europe data center.
SigUtils.getDynamicSessionSignature - a new method for implementing dynamic control over login session expiration. Learn more in the Control Session Expiration guide.
GSRequest.setProxy - a new method that gives you the option to specify a proxy, through which the request will be sent.
timeout - a new optional parameter in the GSRequest.send method. This parameter gives the option to set a response timeout.
Note This version is not backwards compatible. You may need to make minor changes in your code, if you are upgrading from a former version. Please follow the migration instruction below. Upgrading to this version is required, if you wish to integrate Gigya's Game Mechanics or the Gigya Cloud Storage platform.
GSDictionary class is deprecated, and is replaced by the following new classes:
GSObject - New class, used for passing parameters, for example when issuing requests or receiving response data.
GSArray - New class, used for passing Arrays, for example when issuing requests or receiving response data.
Search for all instances of GSDictionary class in your code. Replace each GSDictionary instance with GSObject, and each GSDictionaryarray with GSArray. For example:
Old Code (using GSDictionary):
// Publish User Action
// Defining the userAction parameter
$userAction = new GSDictionary();
$userAction->put("title", "This is my title");
$userAction->put("userMessage", "This is my user message");
$userAction->put("description", "This is my description");
$userAction->put("linkBack", "http://google.com");
$mediaItems = array();
$mediaItems[0] = new GSDictionary("{\"src\":\"http://www.f2h.co.il/logo.jpg\", \"href\":\"http://www.f2h.co.il\",\"type\":\"image\"}");
$userAction->put("mediaItems", $mediaItems);
// Sending 'socialize.publishUserAction' request
$request = new GSRequest("PUT-YOUR-APIKEY-HERE", "PUT-YOUR-SECRET-KEY-HERE", "socialize.publishUserAction");
$request->setParam("userAction", $userAction); // set the "userAction" parameter
$request->setParam("uid", "PUT-UID-HERE"); // set the "uid" parameter to user's ID
$response = $request->send();New Code (using GSObject and GSArray):
// Publish User Action
// Defining the userAction parameter
$userAction = new GSObject();
$userAction->put("title", "This is my title");
$userAction->put("userMessage", "This is my user message");
$userAction->put("description", "This is my description");
$userAction->put("linkBack", "http://google.com");
$mediaItems = new GSArray();
$mediaItems->add(new GSObject("{\"src\":\"http://www.f2h.co.il/logo.jpg\", \"href\":\"http://www.f2h.co.il\",\"type\":\"image\"}"));
$userAction->put("mediaItems", $mediaItems);
// Sending 'socialize.publishUserAction' request
$request = new GSRequest("PUT-YOUR-APIKEY-HERE", "PUT-YOUR-SECRET-KEY-HERE", "socialize.publishUserAction");
$request->setParam("userAction", $userAction); // set the "userAction" parameter
$request->setParam("uid", "PUT-UID-HERE"); // set the "uid" parameter to user's ID
$response = $request->send();When sending a request, if useHTTPS is set to 'true', the request is not signed and the secret key is passed instead - this saves CPU of calculating signature, since it's secured by HTTPS.