承接 vikas5914/steam-auth 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

vikas5914/steam-auth

最新稳定版本:v1.0.4

Composer 安装命令:

composer require vikas5914/steam-auth

包简介

A simple PHP Steam login and User Detail package

README 文档

README

Latest Stable Version Total Downloads License GitHub issues Packagist

This package enables you to easily log users in via Steam and get user details , using their OpenID service. However, this package does not require that you have the OpenID PHP module installed!

Installation Via Composer

Add this to your composer.json file, in the require object:

"vikas5914/steam-auth": "1.*"

After that, run composer install to install the package.

OR

composer require vikas5914/steam-auth:1.*

Usage example

require __DIR__ . '/vendor/autoload.php';

$config = array(
    'apikey' => 'xxxxxxxxxxxxxxxxx', // Steam API KEY
    'domainname' => 'http://localhost:3000', // Displayed domain in the login-screen
    'loginpage' => 'http://localhost:3000/index.php', // Returns to last page if not set
    "logoutpage" => "",
    "skipAPI" => false, // true = dont get the data from steam, just return the steamid64
);

$steam = new Vikas5914\SteamAuth($config);

if ($steam->loggedIn()) {
    echo "Hello " . $steam->personaname . "!";
    echo "<a href='" . $steam->logout() . "'>Logout</a>";
} else {
    echo "<a href='" . $steam->loginUrl() . "'>Login</a>";
}

User-Data is accessible through $steam->varName; You can find a basic list of variables in the demo file or a more advanced one in the code.

Check if the user is logged in with $steam->loggedIn(); (Will return true or false)

Planned

  1. Test Case
  2. Better ReadMe

Legal stuff

If you choose to use the steam web-api you need to follow the Steam Web API Terms of Use found at http://steamcommunity.com/dev/apiterms

The marked code is taken from Syntax_Error's "Ultra Simple Steam-Login" Class found at http://forums.steampowered.com/forums/showthread.php?t=1430511

forthebadge

统计信息

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

GitHub 信息

  • Stars: 18
  • Watchers: 3
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-10