From 996d126611561afde3a7be29e168e4e8d1a7763e Mon Sep 17 00:00:00 2001 From: Gravit Date: Sat, 29 Aug 2020 14:37:56 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=97=D0=B0=D0=B1=D1=8B=D1=82=D1=8B?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D1=80=D1=83=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D1=8B=20=D0=B4=D0=BB=D1=8F=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launchserver/auth/MySQLSourceConfig.java | 15 +++++++++++++++ .../gravit/launcher/request/auth/AuthRequest.java | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/MySQLSourceConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/MySQLSourceConfig.java index 82dafef4..a3b787f5 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/MySQLSourceConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/MySQLSourceConfig.java @@ -42,6 +42,21 @@ public MySQLSourceConfig(String poolName) { this.poolName = poolName; } + public MySQLSourceConfig(String poolName, String address, int port, String username, String password, String database) { + this.poolName = poolName; + this.address = address; + this.port = port; + this.username = username; + this.password = password; + this.database = database; + } + + public MySQLSourceConfig(String poolName, DataSource source, boolean hikari) { + this.poolName = poolName; + this.source = source; + this.hikari = hikari; + } + @Override public synchronized void close() { if (hikari) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java index 5c0b5a6d..e51b8505 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/auth/AuthRequest.java @@ -55,6 +55,14 @@ public AuthRequest(String login, String password, String auth_id, ConnectTypes a this.getSession = false; } + public AuthRequest(String login, AuthPasswordInterface password, String auth_id, boolean getSession, ConnectTypes authType) { + this.login = login; + this.password = password; + this.auth_id = auth_id; + this.getSession = getSession; + this.authType = authType; + } + public static void registerProviders() { if (!registerProviders) { providers.register("plain", AuthPlainPassword.class);