Package net.minheur.potoflux.login
Class RequestPoster
java.lang.Object
net.minheur.potoflux.login.RequestPoster
This posts all requests to the SQL database.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddUser(String token, String email, String password, String firstName, String lastName, String[] perms, int rank) static StringcheckToken(String token) static StringcreateAccount(String email, String password, String firstName, String lastName) static Stringstatic StringgetUserInfos(String token, String userUuid) static Stringstatic Stringstatic StringlockAccountCreation(String token, boolean newState) static Stringstatic Stringstatic StringmdUserInfos(String token, String targetUuid, String newEmail, String newFirstName, String newLastName, int newRank) static StringmdUserPassword(String token, String targetUuid, String newPassword) static voidstatic String
-
Constructor Details
-
RequestPoster
public RequestPoster()
-
-
Method Details
-
login
- Throws:
IOException
-
checkToken
- Throws:
IOExceptionInvalidTokenException
-
getInfos
- Throws:
IOExceptionInvalidTokenException
-
addUser
public static String addUser(String token, String email, String password, String firstName, String lastName, String[] perms, int rank) throws InvalidTokenException, IOException - Throws:
InvalidTokenExceptionIOException
-
rmUser
- Throws:
InvalidTokenExceptionIOException
-
createAccount
public static String createAccount(String email, String password, String firstName, String lastName) throws IOException - Throws:
IOException
-
listUsers
- Throws:
InvalidTokenExceptionIOException
-
getUserInfos
public static String getUserInfos(String token, String userUuid) throws InvalidTokenException, IOException - Throws:
InvalidTokenExceptionIOException
-
mdUserInfos
public static String mdUserInfos(String token, String targetUuid, @CheckForNull String newEmail, @CheckForNull String newFirstName, @CheckForNull String newLastName, int newRank) throws InvalidTokenException, IOException - Throws:
InvalidTokenExceptionIOException
-
mdUserPassword
public static String mdUserPassword(String token, String targetUuid, String newPassword) throws InvalidTokenException, IOException - Throws:
InvalidTokenExceptionIOException
-
lockUser
public static String lockUser(String token, String targetUuid, boolean newState) throws InvalidTokenException, IOException - Throws:
InvalidTokenExceptionIOException
-
lockAccountCreation
public static String lockAccountCreation(String token, boolean newState) throws InvalidTokenException, IOException - Throws:
InvalidTokenExceptionIOException
-
rmToken
- Throws:
IOException
-
isAccountCreationEnabled
- Throws:
IOException
-