diff options
| author | syeyoung <cyoung06@naver.com> | 2023-02-27 02:25:50 +0900 |
|---|---|---|
| committer | syeyoung <cyoung06@naver.com> | 2023-02-27 02:25:50 +0900 |
| commit | bd6d9e260916648d28f21b034d910c81d2c226fa (patch) | |
| tree | c662540085efacd2e77abaa80e484011cb825054 /loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth | |
| parent | 85680da71fabcbd5179eab1b9e4698b3aa92722c (diff) | |
| download | Skyblock-Dungeons-Guide-bd6d9e260916648d28f21b034d910c81d2c226fa.tar.gz Skyblock-Dungeons-Guide-bd6d9e260916648d28f21b034d910c81d2c226fa.tar.bz2 Skyblock-Dungeons-Guide-bd6d9e260916648d28f21b034d910c81d2c226fa.zip | |
- Proper User Agent
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth')
| -rw-r--r-- | loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/DgAuthUtil.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/DgAuthUtil.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/DgAuthUtil.java index d1abadca..c1041192 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/DgAuthUtil.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/DgAuthUtil.java @@ -22,6 +22,7 @@ import com.mojang.authlib.GameProfile; import com.mojang.authlib.exceptions.AuthenticationException; import com.mojang.authlib.minecraft.MinecraftSessionService; import kr.syeyoung.dungeonsguide.launcher.LetsEncrypt; +import kr.syeyoung.dungeonsguide.launcher.LoaderMeta; import kr.syeyoung.dungeonsguide.launcher.Main; import kr.syeyoung.dungeonsguide.launcher.auth.token.AuthToken; import kr.syeyoung.dungeonsguide.launcher.auth.token.DGAuthToken; @@ -101,7 +102,7 @@ public class DgAuthUtil { HttpsURLConnection connection = (HttpsURLConnection) new URL(Main.DOMAIN + "/auth/v2/requestAuth").openConnection(); connection.setSSLSocketFactory(LetsEncrypt.LETS_ENCRYPT); - connection.setRequestProperty("User-Agent", "DungeonsGuide/4.0"); + connection.setRequestProperty("User-Agent", "DungeonsGuideLoader/"+ LoaderMeta.LOADER_VERSION); connection.setRequestProperty("Content-Type", "application/json"); connection.setConnectTimeout(1000); connection.setReadTimeout(3000); @@ -153,7 +154,7 @@ public class DgAuthUtil { HttpsURLConnection urlConnection = (HttpsURLConnection) new URL(Main.DOMAIN + "/auth/v2/authenticate").openConnection(); urlConnection.setSSLSocketFactory(LetsEncrypt.LETS_ENCRYPT); urlConnection.setRequestMethod("POST"); - urlConnection.setRequestProperty("User-Agent", "DungeonsGuide/4.0"); + urlConnection.setRequestProperty("User-Agent", "DungeonsGuideLoader/"+ LoaderMeta.LOADER_VERSION); urlConnection.setRequestProperty("Content-Type", "application/json"); urlConnection.setConnectTimeout(1000); urlConnection.setReadTimeout(3000); @@ -180,7 +181,7 @@ public class DgAuthUtil { HttpsURLConnection urlConnection = (HttpsURLConnection) new URL(Main.DOMAIN + "/auth/v2/acceptPrivacyPolicy").openConnection(); urlConnection.setSSLSocketFactory(LetsEncrypt.LETS_ENCRYPT); urlConnection.setRequestMethod("POST"); - urlConnection.setRequestProperty("User-Agent", "DungeonsGuide/4.0"); + urlConnection.setRequestProperty("User-Agent", "DungeonsGuideLoader/"+ LoaderMeta.LOADER_VERSION); urlConnection.setRequestProperty("Content-Type", "application/json"); urlConnection.setConnectTimeout(1000); urlConnection.setReadTimeout(3000); |
