using Models;
namespace Services
{
///
/// Service for account authentification
/// Passwords are being passed in this service clearly as the hash function used for passwords is implementation specific
///
public interface IAuthService
{
///
/// Tries to login to an account using its mail address and password.
///
/// The mail address which acts as an identifier for the targeted account
/// The (clear) password used to login.
///
/// Returns an instance of Account representing the account that got logged in.
/// If the login credentials are invalid to log in the targeted acccount, this method returns null.
///
public Account? Login(string email, string password);
///
/// Tries to register to a new account, defining its mail address, username and password.
///
/// The mail address which acts as an identifier for the targeted account
/// The username of the account
/// The (clear) password used to login on next connections attempt.
///
/// Returns an instance of Account representing the account that got newly registered.
/// If the register credentials are invalid, or if the account already exists, this method returns null.
///
public Account? Register(string email, string username, string password);
}
}