AuthMe?

Discussion in 'Spigot Plugin Development' started by yoje4li, Jun 1, 2015.

  1. Hello people, I want to make a small plugin like authme.
    But I don't know how to save passwords with SHA256

    Can someone give an example?

    I want to code like a /register, /login and a /change command
     
  2. You could've googled this one. "Java sha256" yielded me this result on the second hit.
     
    • Funny Funny x 1
  3. I have an idea for what you could do....when a player joined the server for the first time, have them do '/register [password]', with the [password] being whatever they want it to be. Take their password and add it to a list in a config file, along with their name. When a player joins after already registering (by checking if they are in a list for users), then have them login. When they do '/login [password]', check to see if the password matches. You could have a counter checking how may times they try to log in, and if they exceed, let's say, 5 tries, then it kicks them. When they do '/change [password]', just have it change their value in the config file to the new password.

    NOTE: When having them register or change, make them enter it twice so they don't screw it up.