Skip to content
This repository has been archived by the owner on Jan 13, 2019. It is now read-only.

我该如何访问相关的验证地址 #1

Closed
xiaonian233 opened this issue Aug 3, 2018 · 24 comments
Closed

我该如何访问相关的验证地址 #1

xiaonian233 opened this issue Aug 3, 2018 · 24 comments

Comments

@xiaonian233
Copy link

感谢作者您的项目,但是在8080/我使用8080/authserver/authenticate提示的是Cannot GET /authserver/authenticate求解

@lgou2w
Copy link
Owner

lgou2w commented Aug 3, 2018

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

@xiaonian233
Copy link
Author

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

@lgou2w
Copy link
Owner

lgou2w commented Aug 3, 2018

是的,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

@xiaonian233
Copy link
Author

噢噢谢谢作者我了解了

@lgou2w
Copy link
Owner

lgou2w commented Aug 3, 2018

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

@xiaonian233
Copy link
Author

好的谢谢

@xiaonian233
Copy link
Author

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

@lgou2w
Copy link
Owner

lgou2w commented Aug 3, 2018

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

@xiaonian233
Copy link
Author

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

@lgou2w
Copy link
Owner

lgou2w commented Aug 3, 2018

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

@xiaonian233
Copy link
Author

行我试试

@xiaonian233
Copy link
Author

看起来没问题了我再试试

@lgou2w
Copy link
Owner

lgou2w commented Aug 3, 2018

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


image
image
image

@xiaonian233
Copy link
Author

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

@xiaonian233
Copy link
Author

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

@xiaonian233
Copy link
Author

作者新的问题
(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.

@xiaonian233
Copy link
Author

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

@xiaonian233
Copy link
Author

@xiaonian233
Copy link
Author

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

@xiaonian233
Copy link
Author

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

@xiaonian233
Copy link
Author

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

@lgou2w
Copy link
Owner

lgou2w commented Aug 7, 2018

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

@xiaonian233
Copy link
Author

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

@lgou2w
Copy link
Owner

lgou2w commented Aug 8, 2018

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

@lgou2w lgou2w closed this as completed Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants