Commit Graph

929 Commits

Author SHA1 Message Date
ljacqu 9b93e0e4b6 Disable GeoIP with config: remove field, fix tests 2023-09-24 18:25:54 +02:00
ljacqu f24d6c5b5f Update translation doc page, add comment for missing entries, fix verifyMessages task 2023-06-21 12:15:57 +02:00
ljacqu db04fd2a5b Avoid setting field with reflection on a JDK class - fails on newer JDK versions 2023-06-20 17:03:06 +02:00
ljacqu 9fd532d798 Minor: Rename StringUtils#isEmpty to #isBlank
- Better fits the naming used by other tools and also the JDK (String#isBlank as of JDK 11)
2022-12-30 08:44:29 +01:00
ljacqu 779e62674e #2661 Remove mocks of InetAddress (which is a sealed class in JDK 19)
- Remove mocks of InetAddress in favor of using real InetAddress instances. This fixes test issues under JDK 19, where InetAddress has been changed to a sealed class
2022-12-30 08:27:51 +01:00
Gabriele C d7437bd2b1 Bump log4j dependency (keep in sync with 1.12.2) 2022-10-27 02:08:02 +02:00
Gabriele C 75b3a571e1 Always specify Locale on toLowerCase and toUpperCase usages, fixes AuthMe not working correctly on machines with turkish locale. ('I'.toLowerCase() => 'ı') 2022-08-20 04:41:04 +02:00
Gabriele C 7c8bbe6294 Remove cache-update bungee messages, always use the player in the context to send bungee messages, minor codestyle changes 2022-08-18 01:48:34 +02:00
Caro 7530528432
Add test for AuthMeApi.getLastLoginMillis (#2562) 2022-07-16 18:35:42 +02:00
games647 0b6c92949c
Add test for the warning if the BungeeCord is enabled 2022-07-06 15:27:49 +02:00
ljacqu 571c6106a7 Fix some Checkstyle issues
- Remove unused imports
- Fix issues relating to line length / whitespace
- Update Checkstyle suppression in matcher classes with new check name
2022-01-30 10:32:49 +01:00
ljacqu d5b6d1584c Initialize logger in MySqlDefaultChangerTest 2022-01-06 00:32:43 +01:00
Gabriele C b74496fb15 Update to Spigot 1.18 api
+ Add legacy jar for 1.17 and previous
2021-11-28 18:17:10 +01:00
ljacqu a99daea5ce Fix failing test
- Add missing setup of ConsoleLogger
2021-10-09 15:00:47 +02:00
David Maes d969d314b3
LuckPerm: keep contexts active after reload of groups (#2186)
* Use context aware groups

* Revert "Use context aware groups"

This reverts commit 5adc6ef7

* Keep luckperm contexts after authentication

* Code cleanup

* Code cleanup

* Fix nullpointer for context maps

* Code cleanup

* Use uuids for sqlite and postgresql

* Revert "Use uuids for sqlite and postgresql"

This reverts commit 05296e5f23.

* Cleanup imports

* Fix test

Co-authored-by: David Maes <david.maes@kbc.be>
2021-08-21 22:19:45 +02:00
Hao Wang c5175395f7 fix a flaky test 2021-07-16 11:48:55 -07:00
ljacqu 5be9b380e5 Fix failing AuthMeInitializationTest 2021-05-27 10:26:29 +02:00
Gabriele C 990830c395 Bump spigot api version, fix BukkitService.runTaskTimerAsynchronously() #2150 2020-07-10 20:55:15 +02:00
Gabriele C 06be8ea6f4 Port thread safety/performance optimizations from #1992 2020-06-26 22:23:50 +02:00
ljacqu d51781fe5c Fix failing tests 2020-05-02 13:08:56 +02:00
ljacqu 7d4dfe3ee3 Fix failing tests after Mockito upgrade 2020-03-03 08:22:00 +01:00
ljacqu f7911edd60
#1448 Create AuthMePlayer to get player data from API with (#2000)
* #1448 Create AuthMePlayer to get player data from API with

* #1448 Add tests for new API method & AuthMePlayer

* #1448 Create AuthMePlayer to get player data from API with
- Use Optional for all values that may be null

* #1448 Add comment that AuthMePlayer data does not update itself
2020-02-12 20:06:42 +01:00
Gabriele C a43127dd2b
Update the GeoIp database download method [BREAKING] (#1990)
* Update the GeoIp database download method [BREAKING]

Now GeoIp database updates require a ClientID and a LicenseKey, which can be obtained for free at https://www.maxmind.com/en/accounts/current/license-key

* Codestyle
2020-01-21 10:28:50 +01:00
ljacqu b17231a2c5 Update translations doc page 2019-12-28 12:07:30 +01:00
Gabriele C e05c07799d Compile against 1.15 api, update luckperms to 5.0 (breaking change) 2019-12-12 16:41:44 +01:00
ljacqu 51260fd22d Disable regular Hikari log statements during test execution
- Also use mock logger instead of a real one in a few select tests to reduce the log output during tests
2019-11-03 17:38:14 +01:00
ljacqu 39fbb4ac05 Remove tests calling hidden constructor of util classes
- Newer versions of JaCoCo now ignore hidden constructors out of the box so we don't need the dummy method that calls the constructor for coverage anymore
2019-11-03 11:27:18 +01:00
ljacqu e31cb5bb9e Fix some CodeClimate issues
- Mostly missing Javadoc on methods & line length violations
2019-11-03 10:54:43 +01:00
ljacqu 2673eb0f8e Mockito: Replace deprecated verifyZeroInteractions with verifyNoInteractions 2019-10-26 21:56:54 +02:00
ljacqu 776d1e5fa3 Fix failing test
- googleauth uses a new website to generate QR codes, cf. https://github.com/wstrange/GoogleAuth/issues/77
2019-10-26 21:52:43 +02:00
Arvind Kumar d6711d83b3 Fixes in documentation (#1927)
* Fixed typos and grammer in documentation
2019-10-17 08:34:27 +02:00
Gabriele C d30580d5d4
Listener optimizations (#1884)
* Drop CraftBukkit support, listeners cleanup

* Codestyle

* Codestyle

* Remove useless player.saveData() calls

* Micro optimization on the join process

* Requested changes

* Fix unit test

* Test onPlayerHeldItem listener

* Requested changes

* Remove unused import
2019-08-11 23:47:50 +02:00
ljacqu e2f2ff0763 #1874 Output number of loggers in /authme debug stats 2019-08-11 11:36:28 +02:00
ljacqu 363e85e363 Set up logger at start of initialization to avoid NPE on errors later on
- Thanks to sgdc3 for the hint
2019-08-11 11:32:03 +02:00
ljacqu 647ee245e0 #1874 Format debug messages in log, use Java 8 date formatter
- Format debug messages properly in the authme.log as well
- Replace DateFormat with Java 8's DateTimeFormatter (which is thread-safe)
2019-08-10 22:44:57 +02:00
ljacqu f268f7cd65 Fix verifyMessages tool task not finding English messages for todo comments 2019-08-10 22:34:45 +02:00
Gabriele C 48357831cd
Revert "Packet based movement freeze (#1879)" (#1882)
This reverts commit db3acce70c.
2019-08-07 10:49:23 +02:00
Gabriele C db3acce70c Packet based movement freeze (#1879)
* Remove unused files
* Remove walk/fly speed from limbo player
* Implement packet based movement freeze
2019-08-07 06:47:00 +02:00
ljacqu d87fa860e6 Add test for UuidUtils 2019-08-06 19:42:06 +02:00
ljacqu c34f00f759 #1874 Introduce individual ConsoleLogger instance per class (#1875)
* #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
2019-08-06 15:15:16 +02:00
ljacqu ae68667f5e Add Maven profile to skip Javadoc generation for local builds (#1878)
* #1877 Add Maven profile to skip Javadoc generation for local builds

* Make it nicer
2019-08-06 01:12:01 +02:00
ljacqu 7bede2528f
#1523 Create admin commands to handle players' 2FA data (#1876)
* #1523 Create admin commands to handle players' 2FA data
- Create admin command to view if a player has enabled 2FA
- Create admin command to disable 2FA for a specified player
2019-08-05 19:31:59 +02:00
ljacqu f0d3d085c6 #1574 Use server name in 2FA QR code link instead of IP 2019-08-02 15:38:13 +02:00
ljacqu c00109074a Minor: create dummy string of specific length with better method 2019-08-02 15:29:06 +02:00
ljacqu 210a4f61cb #1219 Make 2FA tokens one-use only (#1848)
- Make TotpAuthenticator keep track of the used codes and reject any known ones
2019-07-06 18:26:43 +02:00
ljacqu fc06558687 Minor: change bukkit service to return a plain collection of Player
- List is read-only and can be easily "upcast" to Collection<Player>
- Remove awkward hack that was needed for mocking the method previously (issues with generics)
2019-06-22 23:50:06 +02:00
ljacqu 4be130b71b Fix #1493 Extract handling of message file paths to a separate class with constants 2019-06-22 22:37:32 +02:00
ljacqu ff2f43bdc5 #1743 Stop mobs from targetting players when not authenticated 2019-06-22 20:54:01 +02:00
ljacqu 6903e058d5 Undo star imports 2019-06-17 22:02:10 +02:00
ljacqu e9cd16aaac Undo star imports 2019-06-17 21:58:25 +02:00