mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-22 07:14:16 +03:00
Фикс MySQLAuthHandler
This commit is contained in:
parent
c7c270fc2c
commit
bac2ac9d50
4 changed files with 16 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -65,4 +65,9 @@ public static void registerHandlers() {
|
|||
|
||||
|
||||
public abstract String uuidToUsername(UUID uuid) throws IOException;
|
||||
|
||||
public void init()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -64,4 +64,8 @@ public static String getProviderName(Class clazz)
|
|||
}
|
||||
return null;
|
||||
}
|
||||
public void init()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue