2017 © Pedro Peláez
 

library gigya-client

REST Client for Gigya API

image

graze/gigya-client

REST Client for Gigya API

  • Tuesday, October 17, 2017
  • by graze
  • Repository
  • 9 Watchers
  • 5 Stars
  • 24,873 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 10 Versions
  • 9 % Grown

The README.md

gigya-client

, (*1)

Latest Version on Packagist Software License Build Status Total Downloads Coverage Status Quality Score, (*2)

Client for Gigya's REST API, (*3)

  • Endpoint call hierarchy: $gigya->accounts()->tfa()->getCertificate()
  • List of endpoints: accounts, accounts->tfa, audit, socialize, comments, gameMechanics, reports, dataStore, identityStorage, saml, saml->idp
  • Populated classes with auto completion helpers for the available methods from Gigya
  • Different authentication methods:
    • gigya: add api_key and secret to https web requests
    • credentials: uses client_id and client_secret for use with oauth2 token retrieval
    • gigya-oauth2: uses an automatically retrieved OAuth2 token
    • custom: use your own custom authentication (or use oauth2 with a provided token)

Install

The simplest way to install the client is with composer and running:, (*4)

$ composer require graze/gigya-client

Usage

By Default the Gigya client uses gigya auth and appends the api_key and secret onto the query string when calling gigya over https., (*5)

$gigya = new Gigya($key, $secret);

$response = $gigya->accounts()->getAccountInfo(['uid' => $uid]);
if ($response->getErrorCode() === ErrorCode::OK) {
    $account = $response->getData();
}

OAuth 2

You can also use oauth2 in server mode and retrieve information about all accounts, (*6)

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

Social OAuth 2

OAuth2 can also be used to retrieve information about a single account without knowledge of the uid., (*7)

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

$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., (*8)

Testing

$ make install
$ make test

Contributing

Please see CONTRIBUTING for details., (*9)

Security

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

Credits

License

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

The Versions

17/10 2017

dev-master

9999999-dev https://github.com/graze/gigya-client

REST Client for Gigya API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Harry Bragg

gigya graze gigya-client

17/10 2017
17/10 2017

dev-v2-prep

dev-v2-prep https://github.com/graze/gigya-client

REST Client for Gigya API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Harry Bragg

gigya graze gigya-client

05/06 2017
10/01 2017

v1.0.x-dev

1.0.9999999.9999999-dev https://github.com/graze/gigya-client

REST Client for Gigya API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Harry Bragg

graze gigya-client

01/12 2016
06/11 2015

v0.2.1

0.2.1.0 https://github.com/graze/gigya-client

REST Client for Gigya API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Harry Bragg

graze gigya-client

26/10 2015

v0.2.0

0.2.0.0 https://github.com/graze/gigya-client

REST Client for Gigya API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Harry Bragg

graze gigya-client

07/10 2015

v0.1.0

0.1.0.0 https://github.com/graze/gigya-client

REST Client for Gigya API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Harry Bragg

graze gigya-client