Email verification code (#1382)
* Base verification code implementation, must define command, manager, events * VerificationManager, verification command and messages, handled some sensible commands, configuration values * Improved manager and sensible commands trigger * Updated messages * Updated verification code manager, fixed tests * Switched to a permission based command * Verification manager and command improved and added tests * Edited messages
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package fr.xephi.authme.process.logout;
|
||||
|
||||
import fr.xephi.authme.data.VerificationCodeManager;
|
||||
import fr.xephi.authme.data.auth.PlayerAuth;
|
||||
import fr.xephi.authme.data.auth.PlayerCache;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
@@ -26,6 +27,9 @@ public class AsynchronousLogout implements AsynchronousProcess {
|
||||
@Inject
|
||||
private PlayerCache playerCache;
|
||||
|
||||
@Inject
|
||||
private VerificationCodeManager codeManager;
|
||||
|
||||
@Inject
|
||||
private SyncProcessManager syncProcessManager;
|
||||
|
||||
@@ -52,6 +56,7 @@ public class AsynchronousLogout implements AsynchronousProcess {
|
||||
}
|
||||
|
||||
playerCache.removePlayer(name);
|
||||
codeManager.unverify(name);
|
||||
database.setUnlogged(name);
|
||||
database.revokeSession(name);
|
||||
syncProcessManager.processSyncPlayerLogout(player);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package fr.xephi.authme.process.quit;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.data.VerificationCodeManager;
|
||||
import fr.xephi.authme.data.auth.PlayerAuth;
|
||||
import fr.xephi.authme.data.auth.PlayerCache;
|
||||
import fr.xephi.authme.datasource.CacheDataSource;
|
||||
@@ -44,6 +45,9 @@ public class AsynchronousQuit implements AsynchronousProcess {
|
||||
@Inject
|
||||
private ValidationService validationService;
|
||||
|
||||
@Inject
|
||||
private VerificationCodeManager codeManager;
|
||||
|
||||
AsynchronousQuit() {
|
||||
}
|
||||
|
||||
@@ -80,6 +84,7 @@ public class AsynchronousQuit implements AsynchronousProcess {
|
||||
|
||||
//always unauthenticate the player - use session only for auto logins on the same ip
|
||||
playerCache.removePlayer(name);
|
||||
codeManager.unverify(name);
|
||||
|
||||
//always update the database when the player quit the game (if sessions are disabled)
|
||||
if (wasLoggedIn) {
|
||||
|
||||
Reference in New Issue
Block a user