graze/gigya-client
Composer 安装命令:
composer require graze/gigya-client
包简介
REST Client for Gigya API
关键字:
README 文档
README
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 - Populated classes with auto completion helpers for the available methods from Gigya
- Different authentication methods:
gigya: addapi_keyandsecretto https web requestscredentials: usesclient_idandclient_secretfor use with oauth2 token retrievalgigya-oauth2: uses an automatically retrieved OAuth2 tokencustom: 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:
$ 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.
$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
$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.
$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.
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.
graze/gigya-client 适用场景与选型建议
graze/gigya-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 98.65k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2015 年 10 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「gigya」 「graze」 「gigya-client」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 graze/gigya-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 graze/gigya-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 graze/gigya-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Merge arrays recusively using custom value choosers
Retry tasks that fail due to transient faults
run a pool of processes simultaneously
XML utilities, mainly conversion between XML <=> array.
Data Access Layer
Gigya PHP SDK
统计信息
- 总下载量: 98.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-13