fisk/steam-openid
Composer 安装命令:
composer require fisk/steam-openid
包简介
Steam OpenID consumer library
README 文档
README
composer require fisk/steam-openid
A simple, secure library for Steam OpenID clients.
$client = new \SteamOpenID\SteamOpenID("http://example.com"); if ($client->hasResponse()) { try { $result = $client->validate(); print("Signed in as {$result}!"); } catch (Exception $e) { print($e->getMessage()); } } else { // redirect the user to Steam, however this is done in your app header('Location: '.$client->getAuthUrl()); }
php -S localhost:8000 example.php will fire up an example server that redirects to the OpenID gateway and prints out the returned signed-in user ID.
This library does not aim to be a completely universal OpenID client, as we just want it to meet our needs for the Steam OpenID gateway.
This is a fork of a library originally written by xPaw. The original project readme follows:
A very minimalistic OpenID implementation that hardcodes it for Steam only, as using a generic OpenID library may do unnecessary steps of “discovering” OpenID servers, which will end up leaking your origin server address, and worse, leave your website open to vulnerabilities of claiming wrong Steam profiles if the implementation is bugged.
The described problems are not theoretical, LightOpenID
has been proven
to have implementation problems, and even if you use validate and use regex on the final
identity it can be spoofed and a third-party server can be used to pass the validation.
This library aims to avoid these problems by implementing the bare minimum functionality required for validating Steam OpenID requests against the hardcoded Steam server. This library only implements validation, you will need to implement Steam WebAPI calls yourself to fetch user profile information.
Before using this library, please read Valve's terms here.
fisk/steam-openid 适用场景与选型建议
fisk/steam-openid 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.23k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2020 年 12 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「OpenId」 「steam」 「valve」 「steamcommunity」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fisk/steam-openid 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fisk/steam-openid 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fisk/steam-openid 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A correct and simple implementation of OpenID authentication for Steam
Ory-Hydra OAuth 2.0 Client Provider for The PHP League OAuth2-Client
Bare-bones OpenID Connect client
Customize JWT claims in Laravel Passport access tokens
Multi-provider authentication framework for PHP
An open-source VDF parser for Valve's proprietary format used in Source games.
统计信息
- 总下载量: 5.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 29
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-23