Support » Plugin: External Login » [Idea] Adding hash type special for Minecraft Bukkit server plugin called AuthMe

  • Resolved mativve



    I’m writting this post because my last client want to use External Login on their page but he want use data used by AuthMe plugin on Bukkit Minecraft server. Unfortunatly External Login doesn’t have this type of hash.

    So I looked in to code of plugin and… I’ve done this but I had to modify External Login a little bit.

    I called this type of hash “Base AuthMe” that’s usually how it works 🙂
    Based on Internet results[1] I’ve create my own hash type for AuthMe.

    I called this “baseauthme” => “Base AuthMe”

    Below I link two files wich I modified:
    – Exlog_built_plugin_data.php

    – validate_password.php

    Unfortunately, I am not sure if the code is 100% correct, but it currently works without complaints at my client’s.

    If such a feature were added, I would be happy.

    Regards, Mativve


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author tbenyon


    Hi Mativve,

    I try to avoid adding lots of platform specific hashing solutions and have instead opted to provide a hook so that you can add this logic yourself while not modifying the base plugin.

    You can find details on it here:

    There are also a handful of support forum threads that have asked this previously so you can look at those examples too.

    If you have any more questions, please don’t hesitate to get back in contact 🙂



    • This reply was modified 9 months ago by tbenyon.
    Thread Starter mativve


    I understand, thank you for the answer and the proposed solution to this.

    For other users, I share the solution. It works for the basic AuthMe config.yml:
    – minPasswordLength: 4
    – passwordMaxLength: 30
    – passwordHash: SHA256
    – legacyHashes: []
    – doubleMD5SaltLength: 8
    – pbkdf2Rounds: 10000

    Below I share code from functions.php

    // External Login AuthMe
    function auth_me_exlog($password, $hashFromDatabase, $username, $externalUserData) {
        $pass = $password;
        $hash_string = $hashFromDatabase;
        $hash_arr = explode("$", $hash_string);
        $salt = $hash_arr[2];
        $hashed = $hash_arr[3];
        $prepare = '$SHA$' . $salt . '$' . hash('sha256', hash('sha256', $pass) . $salt);
        return ($prepare == $hash_string);
    add_filter('exlog_hook_filter_authenticate_hash', 'auth_me_exlog', 10, 4);
    Plugin Author tbenyon


    Hey @mativve,

    Really cool of you to share this for others – much appreciated 🙂

    If everything is working for you I’d be grateful if you could write a review or even buy me a beer.


    Tom 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Idea] Adding hash type special for Minecraft Bukkit server plugin called AuthMe’ is closed to new replies.