mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
[ANY] IDEA reformat
This commit is contained in:
parent
10df931c2a
commit
82accb211d
1 changed files with 16 additions and 18 deletions
|
@ -18,16 +18,16 @@
|
|||
import pro.gravit.utils.helper.SecurityHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.Clock;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
public abstract class AbstractSQLCoreProvider extends AuthCoreProvider {
|
||||
public transient Logger logger = LogManager.getLogger();
|
||||
|
||||
public abstract SQLSourceConfig getSQLConfig();
|
||||
|
||||
public int expireSeconds = 3600;
|
||||
public String uuidColumn;
|
||||
public String usernameColumn;
|
||||
|
@ -35,11 +35,9 @@ public abstract class AbstractSQLCoreProvider extends AuthCoreProvider {
|
|||
public String passwordColumn;
|
||||
public String serverIDColumn;
|
||||
public String table;
|
||||
|
||||
public String permissionsTable;
|
||||
public String permissionsPermissionColumn;
|
||||
public String permissionsUUIDColumn;
|
||||
|
||||
public PasswordVerifier passwordVerifier;
|
||||
public String customQueryByUUIDSQL;
|
||||
public String customQueryByUsernameSQL;
|
||||
|
@ -54,9 +52,10 @@ public abstract class AbstractSQLCoreProvider extends AuthCoreProvider {
|
|||
public transient String queryPermissionsByUUIDSQL;
|
||||
public transient String updateAuthSQL;
|
||||
public transient String updateServerIDSQL;
|
||||
|
||||
public transient LaunchServer server;
|
||||
|
||||
public abstract SQLSourceConfig getSQLConfig();
|
||||
|
||||
@Override
|
||||
public User getUserByUsername(String username) {
|
||||
try {
|
||||
|
@ -215,8 +214,7 @@ private SQLUser constructUser(ResultSet set) throws SQLException {
|
|||
set.getString(accessTokenColumn), set.getString(serverIDColumn), set.getString(passwordColumn), isEnabledPermissions() ? requestPermissions(set.getString(uuidColumn)) : new ClientPermissions()) : null;
|
||||
}
|
||||
|
||||
public ClientPermissions requestPermissions (String uuid) throws SQLException
|
||||
{
|
||||
public ClientPermissions requestPermissions(String uuid) throws SQLException {
|
||||
try (Connection c = getSQLConfig().getConnection()) {
|
||||
PreparedStatement s = c.prepareStatement(queryPermissionsByUUIDSQL);
|
||||
s.setString(1, uuid);
|
||||
|
|
Loading…
Reference in a new issue