mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
feat: add guided login and authlib URL setup
This commit is contained in:
parent
47bc47786a
commit
630a5fabef
10 changed files with 528 additions and 66 deletions
|
|
@ -26,9 +26,10 @@ namespace MinecraftClient.Protocol.ProfileKey
|
|||
ProxiedWebRequest.Response? response = null;
|
||||
try
|
||||
{
|
||||
var authServer = Settings.Config.Main.General.AuthServer;
|
||||
var request = new ProxiedWebRequest(
|
||||
(authServer.UseHttps ? "https" : "http") + "://" + authServer.Host + ":" + authServer.Port + authServer.AuthlibInjectorAPIPath)
|
||||
if (!Settings.Config.Main.General.TryGetAuthServerUri(out Uri? authServerUri))
|
||||
return false;
|
||||
|
||||
var request = new ProxiedWebRequest(authServerUri.AbsoluteUri)
|
||||
{
|
||||
Accept = "application/json"
|
||||
};
|
||||
|
|
@ -66,9 +67,10 @@ namespace MinecraftClient.Protocol.ProfileKey
|
|||
string certificatesURL = "https://api.minecraftservices.com/player/certificates";
|
||||
if (isYggdrasil)
|
||||
{
|
||||
var authServer = Settings.Config.Main.General.AuthServer;
|
||||
certificatesURL = (authServer.UseHttps ? "https" : "http") + "://" + authServer.Host + ":" + authServer.Port +
|
||||
authServer.AuthlibInjectorAPIPath + "/minecraftservices/player/certificates";
|
||||
if (!Settings.Config.Main.General.TryGetAuthServerUri(out Uri? authServerUri))
|
||||
return null;
|
||||
|
||||
certificatesURL = new Uri(authServerUri, "minecraftservices/player/certificates").AbsoluteUri;
|
||||
}
|
||||
|
||||
ProxiedWebRequest.Response? response = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue