using Femto.Modules.Auth.Data; using Femto.Modules.Auth.Models; namespace Femto.Modules.Auth.Contracts; internal class AuthenticationService(AuthContext context) : IAuthenticationService { public async Task Register(string username, string password) { var user = new UserIdentity(username).WithPassword(password); await context.AddAsync(user); await context.SaveChangesAsync(); return new(user.Id, user.Username); } public async Task Authenticate(string username, string password) { throw new NotImplementedException(); } } public class AuthenticationError(string message, Exception inner) : Exception(message, inner);