Gabriele C
273c318e96
Cleanup
2017-11-02 11:24:17 +01:00
ljacqu
90073ef95d
Merge branch 'master' of https://github.com/AuthMe/AuthMeReloaded into 792-registration-date-and-ip
...
Conflicts:
src/main/java/fr/xephi/authme/command/executable/authme/RegisterAdminCommand.java
src/main/java/fr/xephi/authme/datasource/Columns.java
src/main/java/fr/xephi/authme/datasource/SQLite.java
src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java
src/main/java/fr/xephi/authme/service/SessionService.java
src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java
src/test/java/fr/xephi/authme/service/SessionServiceTest.java
src/test/resources/fr/xephi/authme/datasource/sql-initialize.sql
2017-10-15 23:45:41 +02:00
Gabriele C
22e95493de
#1031 Introduce hasSession field in datasource ( #1351 )
...
* 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
2017-10-15 18:32:51 +02:00
ljacqu
ea58e20c3d
#792 Include registration date into purging logic
...
- 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
2017-10-15 18:29:01 +02:00
Gabriele C
e59df84a84
Fix session system ( #1337 )
...
* Old session system
* Actually check if sessions are enabled
* Cleanup
* Don't use cached isLogged value
2017-09-30 15:15:25 +02:00
ljacqu
07633a89c8
Create SQL data source utils class
...
- Extract logic used in SQLite and MySQL for logging and closing SQL objects
- Decided to leave buildAuthFromResultSet methods individually as this might be more implementation-specific
- Rename DataSource#close to DataSource#closeConnection to fix conflict with static import
2017-04-18 22:55:39 +02:00
ljacqu
04ca36fe53
Use more specific query to get logged in players without email
...
- Reduces the amount of data returned from the DB and the work required to build objects
2017-04-18 22:30:54 +02:00
ljacqu
b99cc3bada
#1127 Create DataSource#getEmail
2017-04-18 21:07:31 +02:00
ljacqu
b3a8c726cf
Use Optional in CacheDataSource again
...
- An exception is thrown e.g. when running '/authme email player' where 'player' does not exist because CacheLoader#load may not ever return null (see Javadoc). Therefore, we are forced to wrap the PlayerAuth in an Optional.
- Use Java 8 Optional instead of Google's
2016-12-11 09:55:47 +01:00
DNx5
2586963780
Remove redundant Optional usages
2016-12-06 01:24:36 +07:00
Gabriele C
58c42cf300
Package cleanup
...
- 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
2016-10-05 21:10:40 +02:00
ljacqu
ff9f50f63f
#886 Do not include players with lastlogin = 0 in autopurge or default purge
2016-09-18 16:49:34 +02:00
ljacqu
e30d7220bd
#472 Store recovery codes in memory instead of in data source
2016-09-16 21:42:16 +02:00
ljacqu
c5f5c0d2fd
#472 Require recovery code before resetting password
...
- /email recovery generates recovery code and resets password only if recovery code is also given
- Change data source method to return email and recovery code
2016-09-10 14:27:26 +02:00
ljacqu
0aac8928af
#472 Create recovery code/expiration columns and methods in data source
2016-09-10 09:13:17 +02:00
Gabriele C
ec3db792ed
Try to fix cache refresh issue on shutdown
2016-08-09 13:48:18 +02:00
ljacqu
5953bfd012
#784 Separate purge execution and purge task creation
...
- Delete accounts in PurgeExecutor, after permission check
2016-07-17 17:33:25 +02:00
ljacqu
e7b980d435
#605 Logger - name methods after their log level
...
- Remove separate print stacktrace method
- Log level into the log similar to console output
2016-07-12 22:06:32 +02:00
ljacqu
dccbd5262f
Don't update IP twice
...
- IP is updated in datasource#updateSession after successful login
- Remove no longer used DataSource#updateIp
2016-07-12 21:45:05 +02:00
games647
837bbd69ac
Remove the debug code as the source for random-logouts is found
2016-06-28 16:09:32 +02:00
ljacqu
3629c51fc1
#674 PurgeService: Always register if purging, reduce code duplication
...
- Rename autoPurging to isPurging: we should always register if a purge task is in progress (regardless if autopurge or not) and deny any new requests
- Reduce the same logic being coded multiple times by calling through the methods
- DataSource: remove purgeBanned in favor of purgeRecords, both do exactly the same thing
2016-06-16 22:52:11 +02:00
ljacqu
2ac89f5938
Apply minor changes to PurgeService
...
- Remove various imports / unused fields
- Make CacheDataSource call source for purging on DB
- Minor: SQLite - place creation of PreparedStatement outside of loop
- Make specific purge actions called from task package-private (clearer from the outside which methods can be called from the outside)
2016-06-16 21:04:12 +02:00
Gnat008
fb8baeafd2
remove database auto purge methods
2016-06-16 12:52:42 -04:00
Gnat008
af1520802d
major refactor of the purging process
2016-06-16 12:28:42 -04:00
Gabriele C
7865d7dc2c
Remove synchronized methods from the Cache (please check)
...
@Xephi @ljacqu @games647
2016-05-23 21:18:31 +02:00
Gabriele C
df2329fd9a
Fix conflict
2016-05-16 16:27:59 +02:00
Xephi59
9db330646e
Try to fix #419
2016-05-15 17:52:54 +02:00
games647
4bad04b160
Add debug statements for finding the source of #419
2016-05-11 16:57:41 +02:00
games647
0bd6ac5cc8
Make the purge progress run more balanced ( Fixes #696 )
2016-05-09 13:09:40 +02:00
ljacqu
b6ccb3e632
#567 Add/change email should be aware of account threshold
2016-04-03 14:24:12 +02:00
ljacqu
dfc713fde6
Reload only specific entities (work in progress)
...
- Remove attempt of reinitializing all components -> will lead to inconsistent states. Call reload on reloadable components instead
2016-03-09 18:39:04 +01:00
ljacqu
98df21d75a
#575 Hotfix for reload support
...
- Create temporary method for reloading any stateful entities -> a lot of duplicated code, to be fixed soon within #432
- Remove unused methods
2016-03-05 22:30:35 +01:00
ljacqu
27b1fa770f
#392 Add datasource integration tests
2016-02-26 22:12:16 +01:00
DNx5
b4aebb685c
Remove player from cache on quit.
2016-02-26 13:10:49 +07:00
DNx5
8324decfa1
Merge branch 'master' into db-improve
...
Conflicts:
src/main/java/fr/xephi/authme/AuthMe.java
2016-02-26 12:42:32 +07:00
DNx5
775e2f7039
Async refresh.
2016-02-26 11:37:47 +07:00
DNx5
bebf1cf7d4
Clean cache on close.
2016-02-22 10:13:48 +07:00
ljacqu
e8f518711c
#442 Fix email presence check being case-insensitive
...
- Add integration tests
- Change DataSource interface to return the number of accounts only, since that's all we require
2016-02-21 21:38:29 +01:00
DNx5
cc29d8b628
Fix duplicate entry error, #528
2016-02-20 06:47:59 +07:00
ljacqu
90e0dc1875
Various code householding
...
- Remove unused API on DataSource
- Add some sensible javadoc to DataSource
- Minor code simplification
2016-02-19 23:19:38 +01:00
DNx5
7c1dd888cc
Fix real name update.
2016-02-16 07:14:40 +07:00
ljacqu
db4d4a7cce
#477 Change lastlogin column from bigint to timestamp (work in progress)
...
- Alter column type
- Create migration for MySQL
- Unrelated: move DataSource enum to its own file
2016-02-07 14:27:03 +01:00
ljacqu
b4b679d3b9
Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 437-add-email
...
Conflicts:
src/main/java/fr/xephi/authme/datasource/MySQL.java
src/main/java/fr/xephi/authme/datasource/SQLite.java
src/main/java/fr/xephi/authme/process/Management.java
src/main/java/fr/xephi/authme/process/email/AsyncChangeEmail.java
2016-02-06 18:01:23 +01:00
DNx5
190b4c2c2e
- Removed executor service and all uses from CachedDataSource.
2016-02-06 00:53:43 +07:00
DNx5
ef89ab02b4
Cleanup imports.
2016-02-05 23:27:34 +07:00
DNx5
c9b884624d
- Make cache RemovalListener sync (no longer use executor).
...
- Fix #433
2016-02-05 23:26:46 +07:00
Xephi
4f76398ce8
#495 - Done
2016-02-05 13:24:38 +01:00
ljacqu
b0ba893827
#437 Add/change email should check if email is already used
...
- Untested/incomplete implementation
2016-01-17 20:41:19 +01:00
DNx5
e0c3affa33
Merge branch 'master' into 137-xenforo-support
...
Conflicts:
src/main/java/fr/xephi/authme/datasource/CacheDataSource.java
src/main/java/fr/xephi/authme/datasource/DataSource.java
src/main/java/fr/xephi/authme/datasource/SQLite.java
src/main/java/fr/xephi/authme/security/crypts/BCRYPT.java
2016-01-06 12:15:27 +07:00
ljacqu
5ec1b67e03
Fix #408 Player quit location is not updated
...
- Ensure that the cache data source updates the quit location on the actual source
2016-01-04 21:52:39 +01:00