Add password capability to user.
[demoscenemusic.git] / src / main / java / net / pterodactylus / demoscenemusic / data / User.java
index 0ca665c..d33daf5 100644 (file)
@@ -49,6 +49,34 @@ public interface User extends Base {
        public User setName(String name);
 
        /**
+        * Sets the password of this user.
+        *
+        * @param password
+        *            The new password of this user
+        * @return This user
+        */
+       public User setPassword(String password);
+
+       /**
+        * Sets the hash of the password of this user.
+        *
+        * @param passwordHash
+        *            The hash of the user’s password
+        * @return This user
+        */
+       public User setPasswordHash(String passwordHash);
+
+       /**
+        * Verifies the given password.
+        *
+        * @param password
+        *            The password to verify
+        * @return {@code true} if the given password matches the user’s password,
+        *         {@code false} otherwise
+        */
+       public boolean verifyPassword(String password);
+
+       /**
         * Returns the privilege level of this user. 0 is the level of a normal user
         * without any special privileges.
         *