MrLetsplay2003 / ShittyAuthServer

Host your own (shitty) authentication server for Minecraft using the Yggdrasil authentication scheme
12 stars 5 forks source link

Add API Documentation #3

Closed danr789 closed 1 year ago

danr789 commented 1 year ago

I have the Server setup and ready to go, but cannot seem to use any launcher apart from yours. Trying to implement this server into another client using the authlib-injector seems to fail, can you document the API so we can Implement it into other launchers as well?

MrLetsplay2003 commented 1 year ago

What exactly doesn't work when using another client? Can you not log in, are there any weird errors? The API is mostly just a reimplementation of the Yggdrasil API, as well as the legacy Mojang skin/cape APIs

danr789 commented 1 year ago

I'm using this as my launcher : https://github.com/Voxelum/x-minecraft-launcher

And I get this error when trying to login :

image

This is my config:

image

Getting this error : me.mrletsplay.mrcore.json.JSONParseException: Invalid generic value: (at char 0) at me.mrletsplay.mrcore.json.JSONParser.readGeneric(JSONParser.java:109) at me.mrletsplay.mrcore.json.JSONParser.parse(JSONParser.java:27) at me.mrletsplay.mrcore.json.JSONObject.<init>(JSONObject.java:31) at me.mrletsplay.simplehttpserver.http.header.DefaultClientContentTypes.lambda$static$1(DefaultClientContentTypes.java:20) at me.mrletsplay.simplehttpserver.http.header.DefaultClientContentTypes.parse(DefaultClientContentTypes.java:53) at me.mrletsplay.simplehttpserver.http.header.PostData.getParsedAs(PostData.java:22) at me.mrletsplay.shittyauth.page.api.yggdrasil.AuthenticatePage.createContent(AuthenticatePage.java:26) at me.mrletsplay.simplehttpserver.http.HttpConnection.receive(HttpConnection.java:100) at me.mrletsplay.simplehttpserver.http.HttpConnection.lambda$startRecieving$0(HttpConnection.java:53) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

MrLetsplay2003 commented 1 year ago

There appears to be some strange bug in the HTTP server, I'll try to fix it

danr789 commented 1 year ago

Alright, this seems mostly fixed, just that API is sent as a HTML response instead of JSON