Coder Social home page Coder Social logo

Comments (24)

lgou2w avatar lgou2w commented on August 20, 2024

首先项目是基于 Minecraft Yggdrasil 的协议开发,authenticatePOST 请求,具体的相关协议实现你可以参考 wiki。链接:
https://wiki.vg/Authentication
https://wiki.vg/Mojang_API

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

啊作者我知道这个操作,我是直接http://192.168.100.105:8080/authserver/authenticate访问的,但是提示就是Cannot GET没有说返回类似确实参数的话之类的还是说必须我要填写完整的它才能正常返回?

from authweb.

lgou2w avatar lgou2w commented on August 20, 2024

是的,authenticatePOST 请求,Cannot GET 的意思就是没有设置 GET 的路由器,所以。
你想看到你期望的结果,你可以使用一些开发工具发送请求,例如 Postman。以 POST 方式并发送数据:

{
    "agent": {                              // 代理
        "name": "Minecraft",                // 代理名 Minecraft
        "version": 1                        // 代理版本号
    },
    "username": "account name",             // 账户名
    "password": "account password",  // 账户密码
    "clientToken": "client identifier",     // 可选;的客户端令牌
    "requestUser": true                     // 可选; 默认: false; 如果为 true 则返回一些用户数据
}

具体参考:https://wiki.vg/Authentication#Authenticate

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

噢噢谢谢作者我了解了

from authweb.

lgou2w avatar lgou2w commented on August 20, 2024

不过我提供的有一个注册的页面,你可以参考一下 authserver/register.js 可以访问 /authserver/register 来注册账户。

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

好的谢谢

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

啊对了作者这个表文件要自建么

from authweb.

lgou2w avatar lgou2w commented on August 20, 2024

不需要,有数据模型的首次运行会自动创建的。

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

我看输出是The MySQL is successfully connected.
但是注册的时候{"error":{"code":"ER_NO_SUCH_TABLE"表示蜜汁没有标

from authweb.

lgou2w avatar lgou2w commented on August 20, 2024

那你可以试一下把数据库删掉,重新运行一下。讲道理,这是我刚学 js 时开发的项目,难免很多bug

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

行我试试

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

看起来没问题了我再试试

from authweb.

lgou2w avatar lgou2w commented on August 20, 2024

新版本之前用 typescriptbootstrap 开发的,不过处于弃坑状态,有生之年吧 2333


image
image
image

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

作者http://192.168.100.105:8080/authserver/authenticate我对这提交post
内容{"agent":{"name":"Minecraft","version":1},"username":"[email protected]","password":"test123456"}
返回结果是空,我是哪里问题么

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

好吧我知道我把邮箱和用户名搞反了

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

作者新的问题
(node:2964) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2964) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

我是强行换uuid,我的UUid最后一位是d放进去就不行,换成其他字母都可以

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

我看了一下js,我就将http://192.168.100.105:8080/session/minecraft/join写入authlib中后台提示404

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

这个我解决了皮肤又挂掉了

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

我该如何设置一个玩家的皮肤呢

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

作者你这个相关的东西在readme写的好少都要靠摸索

from authweb.

lgou2w avatar lgou2w commented on August 20, 2024

抱歉,这只是闲时学习时做的项目而已,所以并不是那么精细

from authweb.

xiaonian233 avatar xiaonian233 commented on August 20, 2024

啊所以这个玩家皮肤应该如和手动设置,在文件里没有摸到

from authweb.

lgou2w avatar lgou2w commented on August 20, 2024

首先暂时不支持不同玩家拥有不同的皮肤,只支持一个默认的档案,详情看这里 config.js#L109-L123
皮肤和披风材质文件存储在 public/textures/{SHA256} ,你可以将自己的皮肤或材质文件名重命名为文件的 SHA256 并存储在此目录,并在 config.js 中修改默认档案即可。

from authweb.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.