From ffeac48b739c06fa7feaec833aa924b24c05529a Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 17 May 2022 21:12:34 +0800 Subject: [PATCH] Adapt PR#964 breaking changes --- .../exzork/gcauth/handler/GCAuthAuthenticationHandler.java | 5 +++-- src/main/java/me/exzork/gcauth/utils/Authentication.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/exzork/gcauth/handler/GCAuthAuthenticationHandler.java b/src/main/java/me/exzork/gcauth/handler/GCAuthAuthenticationHandler.java index 8bef388..05efc07 100644 --- a/src/main/java/me/exzork/gcauth/handler/GCAuthAuthenticationHandler.java +++ b/src/main/java/me/exzork/gcauth/handler/GCAuthAuthenticationHandler.java @@ -1,6 +1,7 @@ package me.exzork.gcauth.handler; import emu.grasscutter.auth.*; +import emu.grasscutter.game.Account; import emu.grasscutter.server.http.objects.ComboTokenResJson; import emu.grasscutter.server.http.objects.LoginResultJson; @@ -21,8 +22,8 @@ public class GCAuthAuthenticationHandler implements AuthenticationSystem { } @Override - public boolean verifyUser(String s) { - return false; + public Account verifyUser(String s) { + return null; } @Override diff --git a/src/main/java/me/exzork/gcauth/utils/Authentication.java b/src/main/java/me/exzork/gcauth/utils/Authentication.java index 09da8f5..e1c65e1 100644 --- a/src/main/java/me/exzork/gcauth/utils/Authentication.java +++ b/src/main/java/me/exzork/gcauth/utils/Authentication.java @@ -11,7 +11,7 @@ import org.springframework.security.crypto.scrypt.SCryptPasswordEncoder; import java.util.HashMap; public final class Authentication { - public static final HashMap tokens = new HashMap(); + public static final HashMap tokens = new HashMap<>(); private static Algorithm key = Algorithm.HMAC256(generateRandomString(32)); public static Algorithm getKey() { return key;