mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-22 16:48:21 +01:00
#1063 Add useSSL option
This commit is contained in:
parent
d761b0ee5c
commit
26194d676d
@ -1,5 +1,5 @@
|
||||
<!-- AUTO-GENERATED FILE! Do not edit this directly -->
|
||||
<!-- File auto-generated on Sat Jan 07 11:33:48 CET 2017. See docs/config/config.tpl.md -->
|
||||
<!-- File auto-generated on Sat Jan 14 22:12:16 CET 2017. See docs/config/config.tpl.md -->
|
||||
|
||||
## AuthMe Configuration
|
||||
The first time you run AuthMe it will create a config.yml file in the plugins/AuthMe folder,
|
||||
@ -34,6 +34,8 @@ DataSource:
|
||||
mySQLRealName: 'realname'
|
||||
# Column for storing players passwords
|
||||
mySQLColumnPassword: 'password'
|
||||
# Request mysql over SSL
|
||||
mySQLUseSSL: true
|
||||
# Column for storing players emails
|
||||
mySQLColumnEmail: 'email'
|
||||
# Column for storing if a player is logged in or not
|
||||
@ -330,6 +332,8 @@ Email:
|
||||
mailAccount: ''
|
||||
# Email account password
|
||||
mailPassword: ''
|
||||
# Email address, fill when mailAccount is not the email address of the account
|
||||
mailAddress: ''
|
||||
# Custom sender name, replacing the mailAccount name in the email
|
||||
mailSenderName: ''
|
||||
# Recovery password length
|
||||
@ -460,4 +464,4 @@ To change settings on a running server, save your changes to config.yml and use
|
||||
|
||||
---
|
||||
|
||||
This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Jan 07 11:33:48 CET 2017
|
||||
This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Jan 14 22:12:16 CET 2017
|
||||
|
@ -31,6 +31,7 @@ import java.util.Set;
|
||||
|
||||
public class MySQL implements DataSource {
|
||||
|
||||
private boolean useSSL;
|
||||
private String host;
|
||||
private String port;
|
||||
private String username;
|
||||
@ -100,6 +101,7 @@ public class MySQL implements DataSource {
|
||||
if (poolSize == -1) {
|
||||
poolSize = Utils.getCoreCount();
|
||||
}
|
||||
this.useSSL = settings.getProperty(DatabaseSettings.MYSQL_USE_SSL);
|
||||
}
|
||||
|
||||
private void setConnectionArguments() {
|
||||
@ -116,6 +118,9 @@ public class MySQL implements DataSource {
|
||||
ds.setUsername(this.username);
|
||||
ds.setPassword(this.password);
|
||||
|
||||
// Request mysql over SSL
|
||||
ds.addDataSourceProperty("useSSL", useSSL);
|
||||
|
||||
// Encoding
|
||||
ds.addDataSourceProperty("characterEncoding", "utf8");
|
||||
ds.addDataSourceProperty("encoding","UTF-8");
|
||||
|
@ -58,6 +58,10 @@ public class DatabaseSettings implements SettingsHolder {
|
||||
public static final Property<String> MYSQL_COL_PASSWORD =
|
||||
newProperty("DataSource.mySQLColumnPassword", "password");
|
||||
|
||||
@Comment("Request mysql over SSL")
|
||||
public static final Property<Boolean> MYSQL_USE_SSL =
|
||||
newProperty("DataSource.mySQLUseSSL", true);
|
||||
|
||||
@Comment("Column for storing players passwords salts")
|
||||
public static final Property<String> MYSQL_COL_SALT =
|
||||
newProperty("ExternalBoardOptions.mySQLColumnSalt", "");
|
||||
|
Loading…
Reference in New Issue
Block a user