From c416c786a0ecd6ce6f4cfd8346785b2b9cf3d7ad Mon Sep 17 00:00:00 2001 From: bivashy Date: Mon, 16 Oct 2023 21:11:42 +0600 Subject: [PATCH] Implement PluginConfig#getMigrationSettings --- .../java/com/bivashy/auth/api/config/PluginConfig.java | 3 +++ .../me/mastercapexd/auth/config/PluginConfigTemplate.java | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/api/src/main/java/com/bivashy/auth/api/config/PluginConfig.java b/api/src/main/java/com/bivashy/auth/api/config/PluginConfig.java index 40594a9c..8368a11f 100644 --- a/api/src/main/java/com/bivashy/auth/api/config/PluginConfig.java +++ b/api/src/main/java/com/bivashy/auth/api/config/PluginConfig.java @@ -12,6 +12,7 @@ import com.bivashy.auth.api.config.link.TelegramSettings; import com.bivashy.auth.api.config.link.VKSettings; import com.bivashy.auth.api.config.message.server.ServerMessages; +import com.bivashy.auth.api.config.migration.MigrationSettings; import com.bivashy.auth.api.config.server.ConfigurationServer; import com.bivashy.auth.api.crypto.CryptoProvider; import com.bivashy.auth.api.database.DatabaseConnectionProvider; @@ -79,6 +80,8 @@ public interface PluginConfig { GoogleAuthenticatorSettings getGoogleAuthenticatorSettings(); + MigrationSettings getMigrationSettings(); + TelegramSettings getTelegramSettings(); VKSettings getVKSettings(); diff --git a/core/src/main/java/me/mastercapexd/auth/config/PluginConfigTemplate.java b/core/src/main/java/me/mastercapexd/auth/config/PluginConfigTemplate.java index bc01c56f..313fb5d2 100644 --- a/core/src/main/java/me/mastercapexd/auth/config/PluginConfigTemplate.java +++ b/core/src/main/java/me/mastercapexd/auth/config/PluginConfigTemplate.java @@ -17,6 +17,7 @@ import com.bivashy.auth.api.config.link.TelegramSettings; import com.bivashy.auth.api.config.link.VKSettings; import com.bivashy.auth.api.config.message.server.ServerMessages; +import com.bivashy.auth.api.config.migration.MigrationSettings; import com.bivashy.auth.api.config.server.ConfigurationServer; import com.bivashy.auth.api.crypto.CryptoProvider; import com.bivashy.auth.api.database.DatabaseConnectionProvider; @@ -107,6 +108,8 @@ public abstract class PluginConfigTemplate implements PluginConfig { private IntStream limboPortRange = IntStream.range(49152, 65535); @ConfigField("authentication-steps") private List authenticationSteps = Arrays.asList("REGISTER", "LOGIN", "VK_LINK", "TELEGRAM_LINK", "GOOGLE_LINK", "ENTER_SERVER"); + @ConfigField("import") + private MigrationSettings migrationSettings; public PluginConfigTemplate(AuthPlugin plugin) { this.plugin = plugin; @@ -296,6 +299,11 @@ public IntStream getLimboPortRange() { return limboPortRange; } + @Override + public MigrationSettings getMigrationSettings() { + return migrationSettings; + } + protected abstract ConfigurationSectionHolder createConfiguration(AuthPlugin plugin); } \ No newline at end of file