kbkk/php-steam-auth
Composer 安装命令:
composer require kbkk/php-steam-auth
包简介
Sign in users with Steam (stateless OpenID)
README 文档
README
Sign in users with Steam (stateless OpenID)
Probably needs to be rethinked
Requirements
- PHP >=5.5
- Guzzle 6
Composer
composer require kbkk/php-steam-auth
Usage example
$yourAppUrl = 'http://github.com/'; $returnTo = 'http://github.com/steam/verify'; $apiKey = 'Your Steam API Key'; $steamAuth = new \SteamAuth\SteamOpenId([ 'realm' => $yourAppUrl, 'return_to' => $returnTo, ]); $steamApi = new \SteamAuth\SteamApi($apiKey); // redirect the user to steam sign in page Redirect::url($steamAuth->getRedirectUrl()); // and verify the data when the user gets back to us $steamid = $steamAuth->verifyAssertion($_GET); //false or steam id 64 as string // fetch user profile if($steamid) $user = $steamApi->getProfile($steamid); // example output array (size=17) 'steamid' => string '76561197960435530' (length=17) 'communityvisibilitystate' => int 3 'profilestate' => int 1 'personaname' => string 'Robin' (length=5) 'lastlogoff' => int 1464428303 'profileurl' => string 'http://steamcommunity.com/id/robinwalker/' (length=41) 'avatar' => string 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/f1/f1dd60a188883caf82d0cbfccfe6aba0af1732d4.jpg' (length=116) 'avatarmedium' => string 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/f1/f1dd60a188883caf82d0cbfccfe6aba0af1732d4_medium.jpg' (length=123) 'avatarfull' => string 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/f1/f1dd60a188883caf82d0cbfccfe6aba0af1732d4_full.jpg' (length=121) 'personastate' => int 0 'realname' => string 'Robin Walker' (length=12) 'primaryclanid' => string '103582791429521412' (length=18) 'timecreated' => int 1063407589 'personastateflags' => int 0 'loccountrycode' => string 'US' (length=2) 'locstatecode' => string 'WA' (length=2) 'loccityid' => int 3961
kbkk/php-steam-auth 适用场景与选型建议
kbkk/php-steam-auth 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.76k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 09 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 kbkk/php-steam-auth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kbkk/php-steam-auth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13.76k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-16