mattiabasone/mc-auth 问题修复 & 功能扩展

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

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

mattiabasone/mc-auth

Composer 安装命令:

composer require mattiabasone/mc-auth

包简介

Minecraft PHP Authentication for Mojang Yggdrasil authentication scheme.

README 文档

README

Minecraft PHP Authentication for Mojang Yggdrasil (http://wiki.vg/Authentication) authentication scheme

Installation

composer require mattiabasone/mc-auth

Example:

Create new MCAuth Object

$MCAuth = new MCAuth\Api();

Authentication:

try {
    $account = $MCAuth->sendAuth("myemail@example.org", "mypassword");
    var_dump($account);
} catch (Exception $e) {
    echo $e->getMessage();
}

Get UUID from username

try {
    $uuid = $MCAuth->usernameToUuid("_Cyb3r");
    var_dump($uuid);
} catch (Exception $e) {
    echo $e->getMessage();
}

Get username from UUID

try {
    $username = $MCAuth->uuidToUsername("be1cac3b60f04e0dba12c77cc8e0ec21");
    var_dump($username);
} catch (Exception $e) {
    echo $e->getMessage();
}

Warning!

Mojang authentication system permits only one active session as reported in the wiki: "Only the one with the latest session ID for your account are allowed to join servers.", so you will be disconnected from the server where you are playing if you try to login via MCAuth.

统计信息

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

GitHub 信息

  • Stars: 31
  • Watchers: 6
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-4-Clause
  • 更新时间: 2017-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固