fisk/steam-openid 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fisk/steam-openid

最新稳定版本:0.3.3

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.

统计信息

  • 总下载量: 5.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-23