Skip to content

Commit

Permalink
Implement PluginConfig#getMigrationSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
bivashy committed Oct 16, 2023
1 parent e4f1650 commit c416c78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -79,6 +80,8 @@ public interface PluginConfig {

GoogleAuthenticatorSettings getGoogleAuthenticatorSettings();

MigrationSettings getMigrationSettings();

TelegramSettings getTelegramSettings();

VKSettings getVKSettings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -107,6 +108,8 @@ public abstract class PluginConfigTemplate implements PluginConfig {
private IntStream limboPortRange = IntStream.range(49152, 65535);
@ConfigField("authentication-steps")
private List<String> 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;
Expand Down Expand Up @@ -296,6 +299,11 @@ public IntStream getLimboPortRange() {
return limboPortRange;
}

@Override
public MigrationSettings getMigrationSettings() {
return migrationSettings;
}

protected abstract ConfigurationSectionHolder createConfiguration(AuthPlugin plugin);

}

0 comments on commit c416c78

Please sign in to comment.