Skip to content

jf-m/gigya-client

 
 

Repository files navigation

gigya-client

Latest Version on Packagist Software License Build Status Total Downloads Coverage Status Quality Score

Client for Gigya's REST API

  • Endpoint call hierarchy: $gigya->accounts()->tfa()->getCertificate()
  • List of endpoints: accounts, accounts->tfa, audit, socialize, comments, gameMechanics, reports, dataStore, identityStorage, saml, saml->idp
  • Different authentication methods:
    • standard: add api_key and secret to https web requests
    • gigya-oauth2: gets an oauth2 token and uses that each time
    • custom: provide you own token retrieved independently

Install

The simplest way to install the client is with composer and running:

$ composer require graze/gigya-client

Usage

$gigya = new Gigya($key, $secret);
$response = $gigya->accounts()->getAccountInfo(['uid' => $uid]);
$account = $response->getData();

OAuth 2

$gigya = new Gigya($key, $secret, $region, $user, ['auth'=>'gigya-oauth2']);
$response = $gigya->accounts()->getAccountInfo(['uid' => $uid]);
$account = $response->getData();

Social OAuth 2

$grant = new ManualGrant();
$gigya = new Gigya($key, $secret, $region, null, ['auth' => 'oauth2-custom']);
$gigya->addSubscriber(new OAuth2Subscriber($grant));

$tokenResponse = $gigya->socialize()->getToken([
    'grant_type' => 'code',
    'authorization_code' => '<xxxxx>',
    'redirect_uri' => '<xxxxx>',
], ['auth' => 'credentials']);

$grant->setToken($tokenResponse->getData()->get('access_token'));

$response = $gigya->accounts()->getAccountInfo();
$account = $response->getData();

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ make install
$ make test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email security@graze.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Communications with Gigya's REST api

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 98.9%
  • Other 1.1%