Implement AuthMeBungee autologin (#1402)

* Implement AuthMeBungee autologin

There is a failing test due to cyclic dependency injection, @ljacqu could you take a quick look at this?

* Try to fix recursive dependency injection

* Fix codestyle

* Fix the subchannel name, again...

* Split BungeeService into BungeeSender and BungeeReceiver
This commit is contained in:
Gabriele C
2017-11-09 11:19:24 +01:00
committed by GitHub
parent 7e079d0b9c
commit b7c3d4b42e
24 changed files with 241 additions and 179 deletions
@@ -10,7 +10,7 @@ import fr.xephi.authme.process.SyncProcessManager;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.service.SessionService;
import fr.xephi.authme.service.ValidationService;
import fr.xephi.authme.service.bungeecord.BungeeService;
import fr.xephi.authme.service.bungeecord.BungeeSender;
import fr.xephi.authme.service.bungeecord.MessageType;
import fr.xephi.authme.settings.SpawnLoader;
import fr.xephi.authme.settings.properties.PluginSettings;
@@ -54,7 +54,7 @@ public class AsynchronousQuit implements AsynchronousProcess {
private SessionService sessionService;
@Inject
private BungeeService bungeeService;
private BungeeSender bungeeSender;
AsynchronousQuit() {
}
@@ -88,7 +88,7 @@ public class AsynchronousQuit implements AsynchronousProcess {
.lastLogin(System.currentTimeMillis())
.build();
database.updateSession(auth);
bungeeService.sendAuthMeBungeecordMessage(MessageType.REFRESH_QUITLOC, name);
bungeeSender.sendAuthMeBungeecordMessage(MessageType.REFRESH_QUITLOC, name);
}
//always unauthenticate the player - use session only for auto logins on the same ip