Фикс MySQLAuthHandler

This commit is contained in:
Gravit 2018-12-26 19:24:38 +07:00
parent c7c270fc2c
commit bac2ac9d50
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
4 changed files with 16 additions and 1 deletions

View file

@ -354,6 +354,11 @@ public LaunchServer(Path dir) throws IOException, InvalidKeySpecException {
config = Launcher.gson.fromJson(reader,Config.class);
}
config.verify();
for(AuthProvider provider : config.authProvider)
{
provider.init();
}
config.authHandler.init();
// build hooks, anti-brutforce and other
buildHookManager = new BuildHookManager();

View file

@ -65,4 +65,9 @@ public static void registerHandlers() {
public abstract String uuidToUsername(UUID uuid) throws IOException;
public void init()
{
}
}

View file

@ -22,7 +22,8 @@ public final class MySQLAuthHandler extends CachedAuthHandler {
private transient String queryByUsernameSQL;
private transient String updateAuthSQL;
private transient String updateServerIDSQL;
public MySQLAuthHandler()
@Override
public void init()
{
// Prepare SQL queries
queryByUUIDSQL = String.format("SELECT %s, %s, %s, %s FROM %s WHERE %s=? LIMIT 1",

View file

@ -64,4 +64,8 @@ public static String getProviderName(Class clazz)
}
return null;
}
public void init()
{
}
}