* If a player is not registered then we send a LOGIN plugin message on join
* Make looking up a profile optionally quiet
This prevents an issue where a forcedLogin of a player that doesn't exist occurring when an unregistered player switches a server. The first login would tell AuthBungee that the player is logged in, and subsequent switches would have AuthBungee send a performLogin back that would then send an unregistered player error message to the player.
Co-authored-by: bundabrg <bundabrg@grieve.com.au>
Co-authored-by: Gabriele C <sgdc3.mail@gmail.com>
* #1874 Introduce individual ConsoleLogger instance per class
- Create ConsoleLoggerFactory from which a separate logger can be created for each class
- Allows to support individual log level settings in the future
* Fix CodeStyle issue
* Replace full class name with import
* Update usages after merge from master
* Add IPv6 support for isLocal checks
* Replace magic values like 127.0.0.1 and use our utility
* Support for IPv6 local adresses in IPv6 only or dual stack environments
* Loopback [::1]
* Site-Local fc00::/7
* Link-local fe80::/10
* Introduce extra method for loopback addresses
* Use public IP for passMaxLogin check
* Use non-local IP addresses in test after change in verification
Rough version.
- Introduces a limbo player state on the LimboPlayer, allowing us to add further mandatory actions between successful (password) authentication and the ability to play on the server
- Overloaded method with (String, String...) as args was problematic as it could be confusing on its own and also confusing with the (CommandSender, String...) flavor
- Split TotpService further into GenerateTotpService and TotpAuthenticator, which wraps the GoogleAuthenticator impl
- Add missing tests for the services
- Change GenerateTotpService's interface to behave like a collection for more intuitive method behavior
- Remove abstract captcha manager in favor of a primitive captcha code storage (composition over inheritance)
- Supply player when checking captcha code for further usage (fixes open point from previous commit)
- Introduce registration captcha manager, rename login captcha manager accordingly
- Integrate reg. captcha manager into /register command
Open points:
- Refactor common captcha functionality into abstract superclass
- If captcha before /register necessary, show appropriate message to player immediately
- Unit tests
* 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
* Introduce hasSession field in datasource
That makes isLogged more consistent as it will be '1' only when the player is online.
* Fixes
* Fix unit testing
* Update config doc
* Create SessionService
* Create test for SessionService, avoid DB operations if sessions are disabled
* Cleanup: remove outdated warning for session timeout = 0
- Remove outdated warning
- Encapsulate session enabled check in SessionService
* Fix failing SessionServiceTest, add data source integration tests for session methods
- Create method to check if email is empty or the default AuthMe email (avoids repetition)
- Check that input email has '@' inside text (relates to #1105)
- Add usage message on argument mismatch where available
- Remove unused message keys
- Create tool task to search for a message key's usages and to find unused keys
- Add new checkstyle checks: require Javadoc on large private methods, default in switch, declaration order & others
- Update path exclusions in CodeClimate config to match newly renamed classes (e.g. PHPBB -> PhpBB)
- Create consistency check testing that excluded paths exist as classes
- Fix some trivial violations
- AsynchronousLogin: call common permission methods through CommonService instead of PermissionsManager
- CommandManager: remove superfluous replacement of %p (handled by lazy tag replacer)
- Remove unused method in CommonService
- Create DebugSectionConsistencyTest
- SendMailSSL: Enable debug output if AuthMe log level is set to debug
- Add Utils#logAndSendMessage and replace existing, separate implementations
- Add methods to LimboService for handling messages to make it the only relevant Limbo class for outside classes
- Move LimboPlayerTaskManager to limbo package and make it package-private
- Create MessageTask and TimeoutTask immediately when LimboPlayer is created
- #1112 MessageTask: improve efficiency by keeping reference to Player
- Introduce new LimboService with a higher level abstraction for outside classes to trigger LimboPlayer actions
- Add methods to LimboPlayerTaskManager for muting the MessagesTask safely
- Remove 'reg_voluntarily'
- Remove 'user_unknown' in favor of 'unknown_user' - but move text from old 'user_unknown' to 'unknown_user'
Found by @Twonox
- Replace CommandService and ProcessService with CommonService: a service that offers our typical needs to work with settings, messages and permissions
- Remove validation methods from CommonService: inject ValidationService directly. Validation methods are not used very frequently and therefore don't belong in CommonService. Their presence was a relict from our architecture before injection was used.
- authme.cache to authme.data
- Rename PlayerData to LimboPlayer to match with LimboCache
- Move authme.converter to authme.datasource.converter
- Split output package into output and message
- Create BukkitService#runTaskOptionallyAsync and BukkitService#scheduleSyncTaskFromOptionallyAsyncTask whose behavior depends on a new setting
- Use the new methods where applicable
- Declare events async or sync depending on the new setting