2020-05-08 14:16:56 +02:00
|
|
|
module server.accounts.base;
|
2020-05-08 10:32:22 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This represents the accounts management system of
|
|
|
|
* the server. It is only an abstract class.
|
|
|
|
*/
|
|
|
|
public abstract class BesterDataStore
|
|
|
|
{
|
2020-05-08 10:39:02 +02:00
|
|
|
/**
|
|
|
|
* Creates a new account with the given `username` and
|
|
|
|
* `password`.
|
|
|
|
*/
|
|
|
|
public abstract void createAccount(string username, string password);
|
2020-05-08 13:29:56 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check if the user, `username`, exists in the database.
|
|
|
|
*/
|
|
|
|
public abstract bool userExists(string username);
|
2020-05-08 13:32:34 +02:00
|
|
|
|
2020-05-08 13:43:09 +02:00
|
|
|
public abstract bool authenticate(string username, string password);
|
|
|
|
|
2020-05-08 13:32:34 +02:00
|
|
|
public abstract void shutdown();
|
2020-05-08 10:32:22 +02:00
|
|
|
}
|