diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java index 8a1b6e5a..6a353e9a 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/LaunchServer.java @@ -617,9 +617,7 @@ private void generateConfigIfNotExists() throws IOException { newConfig.env = LauncherConfig.LauncherEnvironment.STD; newConfig.startScript = JVMHelper.OS_TYPE.equals(JVMHelper.OS.MUSTDIE) ? "." + File.separator + "start.bat" : "." + File.separator + "start.sh"; newConfig.hwidHandler = new AcceptHWIDHandler(); - newConfig.auth = new AuthProviderPair[]{ new AuthProviderPair() }; - newConfig.auth[0].provider = new RejectAuthProvider("Настройте authProvider"); - newConfig.auth[0].handler = new MemoryAuthHandler(); + newConfig.auth = new AuthProviderPair[]{ new AuthProviderPair(new RejectAuthProvider("Настройте authProvider"), new MemoryAuthHandler(), "std") }; newConfig.textureProvider = new RequestTextureProvider("http://example.com/skins/%username%.png", "http://example.com/cloaks/%username%.png"); newConfig.permissionsHandler = new JsonFilePermissionsHandler(); newConfig.port = 7240; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthProviderPair.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthProviderPair.java index 3403e1a6..38e45f4e 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthProviderPair.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/AuthProviderPair.java @@ -9,7 +9,13 @@ public class AuthProviderPair { public AuthProvider provider; public AuthHandler handler; public String name; - public boolean isDefault; + public boolean isDefault = true; + + public AuthProviderPair(AuthProvider provider, AuthHandler handler, String name) { + this.provider = provider; + this.handler = handler; + this.name = name; + } public void init() {