using adas_core.Domain.Enums;
using adas_core.Domain.Models.MongoModels;
using Microsoft.AspNetCore.Http;
using MongoDB.Bson;
namespace adas_core.Authentication.Interfaces;
public interface ILoginService
{
bool AllowPassword { get; }
UserEnum.LoginMethod Method { get; }
///
/// Authenticates a user with the provided credentials and returns the corresponding user account.
///
/// The username of the user attempting to log in.
/// The password associated with the username.
/// A representing the asynchronous operation, containing the authenticated .
Task Login(string username, string password);
///
/// Authenticates a user based on the provided HTTP context.
///
/// The HTTP context containing the request information used to perform the login.
/// A task that represents the asynchronous login operation. The task result contains the authenticated .
Task Login(HttpContext context);
///
/// Authenticates a user based on the provided credentials.
///
/// The username of the user to authenticate.
/// The password of the user to authenticate.
/// A task that represents the asynchronous operation. The task result contains the authenticated .
Task Authenticate(string username, string password);
///
/// Retrieves a user by their unique identifier, returning null if no matching user is found.
///
/// The unique identifier of the user to look up.
/// The user with the specified identifier, or null if no user is found.
Task GetById(ObjectId id);
///
/// Retrieves a user from the data store by their email address, or returns null if no matching user is found.
///
/// The email address used to look up the user.
/// A task that resolves to the matching the provided email, or null if no user is found.
Task GetByEmail(string email);
///
/// Retrieves a user by their username asynchronously, returning null if no matching user is found.
///
/// The username to look up.
/// A that resolves to the matching , or null if no user exists with the specified username.
Task GetByUsername(string username);
///
/// Asynchronously retrieves a list of all users in the system.
///
/// A task that represents the asynchronous operation, containing a list of all entities.
Task> GetAllUsers();
}