- Move helper methods for setting BukkitService mock behavior into their own class
- Change methods to use Mockito's answer instead of verification + argument capture -> calling the methods now belongs to the test setup (given clause) and allows the behavior to take effect more than once
* 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
Ugly implementation to fit into AuthMe 5.4. If email on PlayerAuth is null, do not supply NULL as the email value but use DEFAULT instead so that the default value is used if present in the column configuration.
- Introduce new configuration (taken from @sgdc3)
- Create JoiningPlayer, based on a Player object or String name, determining how permissions will be checked
* Replace DatatypeConverter in Pbkdf2Django to support Java 9
* Fix NPE in AuthMeInitializer and CastException in Recovery tests
* Set logger for SetPasswordTest to prevent NPE on logging
* Use TestHelper for initializing ConsoleLogger
- Move MySQL migrations into a separate class
- Add migration for last IP column to be nullable if it has a not null constraint without a default value
- Check not only for NOT NULL constraint but also if a column has a default value
- Use suffixes instead of colors only so the command is usable via console
- Add argon2 implementation
- Extract argon2 library check to method on Argon 2
- Add link to Wiki page on errors
- Check within Argon2Test if the test cases should be run, not in the abstract parent
- Old SQLite setups have the last IP column as NOT NULL but without a default value. With the new concept (where we don't set a last IP on player registration) it fails.
- Create an /authme debug child that allows to migrate SQLite (tricky because SQLite does not support dropping or modifying columns)
- Allow last IP column to be NOT NULL in MySQL as well (extend MySQL /authme debug child)
- Add TODO comments with follow-up issue to extend our commands with new registration IP field
- Deprecate unsalted hashes: if such a hash is configured, move it to the legacy hashes setting to still support the existing hashes in the database but hash all passwords from now on with our default, SHA256.
* 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
- Take MAX(reg_date, login_date) as timestamp to compare against
- Remove the second "all" parameter to include entries with 0 registration date -> we expect registration date to always be set to the current date, so the parameter becomes obsolete
- Create command under /authme debug that allows to change the 'nullable' status of MySQL columns (currently last date and email only)
- We need to offer a default value for forum integrations that have a NOT NULL email column. Offering a command avoids us from force-migrating existing databases while still offering migrations in both directions
- Change in default value handling: lack of values are not handled by setting default values to the PlayerAuth anymore, and reading a default value from the database into a PlayerAuth will be translated into null by the PlayerAuth builder
- When a new database is created, email and lastlogin are now nullable and lack a default a value
Open points:
- Finish MySqlDefaultChangerTest
- Revise purging logic (#792)
- Allow to have more columns nullable (#814)
- The salt isn't used for password hashing but SMF requires that there be one to generate the authentication cookie. This does not yet enable registration from Minecraft: SMF has other non-null columns that need to be tackled. This is a first step.