[ANY] IDEA reformat

This commit is contained in:
Gravita 2022-11-18 14:39:35 +07:00
parent 10df931c2a
commit 82accb211d

View file

@ -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);