Skip to content

Configuration

LordOfLeaks edited this page Jun 16, 2021 · 3 revisions

Structure

AuthPlus generates two configuration files. One for the functionality configuration and the other for messages customization.

  • Functionality can be configured in config.yml file found under plugins/AuthPlus/ directory.
  • Messages can be changed in messages.yml file found under plugins/AuthPlus/ directory.

Basic configuration for spigot

authplus:
  encryption:
    # Iteration count of the PBKDF2WithHmacSHA512 hashing strategy.
    iteration-count: 5000
  password:
    # Whether we should require user to register with password containing at least one non-alphabetic character (such as !,*,?, etc.).
    should-contain-special-characters: false

    # Whether we should require user to register with password containing at least one upper-case and one lower-case character.
    should-contain-upper-and-lower-case: false

    # The minimum length of the password that user can register with.
    password-minimum-length: 6

  # Whether we should deop all users when they join the server. (Reduces the consequences of a potential breach)
  deop-on-join: false

  # What commands can user dispatch before login or register.
  allowed-login-commands:
   - "/somecommand"
   - "/someothercommand"

Basic configuration for bungee

authplus:
  # What commands can user dispatch before login or register.
  allowed-login-commands:
   - "/somecommand"
   - "/someothercommand"

Database configuration

If you are using AuthPlus in conjunction with proxy you don't have to configure database on every spigot instance as it will not be used - just the proxy.

SQLite (local storage)

authplus:
  storage:
    # Storage type (must be SQLITE or MYSQL).
    type: "SQLITE"

    # Database file to be used by SQLite.
    file: "authplus.db"

MySQL (remote storage)

authplus:
  storage:
    # Storage type (must be SQLITE or MYSQL).
    type: "MYSQL"

    # Username used to establish database connection.
    username: "admin"

    # Password used to establish database connection. (You may remove this field entirely if your database requires no password)
    password: "qwerty"

    # Name of the MySQL database used by AuthPlus
    database: "testdb"

    # Host address of the MySQL server (it may be a literal IP address or DNS name)
    host: "localhost"

    # Port of the MySQL server
    port: 3333

Messages configuration

Note: you may use '\n' character representing new line in messages sent as a kick-message.

Proxy

# Sent as a kick-message when user cannot login due to database connection failure.
login-perform-login-failed: "&cLogin failed due to database error.\n&cPlease try again\
  \ in a minute."

# Sent as a kick-message when user's name contains illegal characters or is too long.
login-invalid-account-name: "&cAccount name \"%accountName%\" is invalid."

Spigot

# Sent when there was a communication error between proxy and spigot when logging the user
command-login-session-update-failed: "&cSession update failed."

# Sent when the user was registered successfully
command-register-success: "&aRegistered successfully."

# Sent as a kick-message when user cannot login due to database connection failure.
login-perform-login-failed: "&cLogin failed due to database error.\n&cPlease try again\
  \ in a minute."

# Sent as a kick-message when user's name contains illegal characters or is too long.
login-invalid-account-name: "&cAccount name \"%accountName%\" is invalid."

# Sent when user was logged successfully
command-login-success: "&aLogged successfully."

# Sent when there was a communication error between proxy and spigot when registering the user
command-register-session-update-failed: "&cSession update failed."

# Sent when there was a communication error between proxy and spigot when retrieving the user's session
login-retrieve-session-failed: "&cCannot retrieve your session.\n&cPlease try again\
  \ in a minute."

# Sent as a kick-message when user tries to join the spigot server directly. (Only when using proxy)
login-direct-connection: "&cPlease join via proxy."

# Sent when the user enters too few or too many arguments to register command
command-register-usage: "&cUse: /%enteredCommand% <password> <repeat password>."

# Sent when user who is logged in tries to invoke login command
command-login-already-logged-in: "&cYou are already logged in."

# Sent when user tries to login with invalid password
command-login-invalid-password: "&cInvalid password."

# Sent when user tries to login but is not registered
command-login-not-registered: "&cYou have to register first."

# Sent when user tries to login or register but their session data was not yet retrieved
command-session-load-in-progress: "&7Hang on! We are fetching your session..."

# Sent when user enters too few or too many arguments to login command
command-login-usage: "&cUse: /%enteredCommand% <password>."

# Sent when a registered user tries to register
command-register-already-registered: "&cYou are already registered."

# Sent when user tries to register but enters two different passwords
command-register-passwords-dont-match: "&cPasswords do not match."

Clone this wiki locally