diff --git a/backend/API/Controllers/AppointmentsController.cs b/backend/API/Controllers/AppointmentsController.cs index 20a598a..5647309 100644 --- a/backend/API/Controllers/AppointmentsController.cs +++ b/backend/API/Controllers/AppointmentsController.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc; namespace API.Controllers; +[Route("api/[controller]")] public class AppointmentsController : BaseApiController { private readonly IAppointmentsMongoDbService _appointmentsMongoDbService; diff --git a/backend/API/Controllers/AuthorizationController.cs b/backend/API/Controllers/AuthorizationController.cs new file mode 100644 index 0000000..b44064a --- /dev/null +++ b/backend/API/Controllers/AuthorizationController.cs @@ -0,0 +1,148 @@ +using Application.Endpoints; +using Application.Endpoints.Authorization; +using Application.Endpoints.Authorization.Doctor; +using Application.Endpoints.Authorization.Patient; +using Application.Services.Database.PostgreSQL; +using Application.Services.Email; +using Application.Services.HashingAlgorithms; +using Application.Services.Jwt; +using Core.Entities; +using Microsoft.AspNetCore.Mvc; + +namespace API.Controllers; + +[Route("api/[controller]")] +public class AuthorizationController : BaseApiController +{ + private readonly IJwtService _jwtService; + private readonly IEmailService _emailService; + private readonly IPatientRepository _patientRepository; + private readonly IDoctorRepository _doctorRepository; + private readonly IHashingAlgorithms _hashingAlgorithms; + + public AuthorizationController(IEmailService emailService, IJwtService jwtService, + IPatientRepository patientRepository, IDoctorRepository doctorRepository, + IHashingAlgorithms hashingAlgorithms) + { + _jwtService = jwtService; + _emailService = emailService; + _patientRepository = patientRepository; + _doctorRepository = doctorRepository; + _hashingAlgorithms = hashingAlgorithms; + } + + [HttpPost("login")] + public async Task> Login(UserLoginModel dto) + { + BaseResponse? response = null; + var loginInfo = new LoginDto(); + loginInfo.Email = dto.Email; + loginInfo.Password = dto.Password; + + switch (dto.UserType) + { + case "doctor": + var handlerDoctor = new DoctorLoginHandler(_doctorRepository, _hashingAlgorithms); + response = await handlerDoctor.Handle(loginInfo).ConfigureAwait(false); + + if (response.Data != null) + { + Doctor patient = (Doctor)response.Data; + var authToken = _jwtService.GenerateJwtToken(patient.Email); + Console.WriteLine(patient.Email); + + HttpContext.Response.Headers.Add("Authorization", $"Bearer {authToken}"); + } + break; + case "patient": + var handlerPatient = new PatientLoginHandler(_patientRepository, _hashingAlgorithms); + response = await handlerPatient.Handle(loginInfo).ConfigureAwait(false); + + if (response.Data != null) + { + Patient patient = (Patient)response.Data; + var authToken = _jwtService.GenerateJwtToken(patient.Email); + + HttpContext.Response.Headers.Add("Authorization", $"Bearer {authToken}"); + } + break; + default: + return new ActionResult(new BaseResponse + { + StatusCode = HttpStatusCodes.BadRequest, + Message = "Need user type.", + Data = null + }); + } + + return StatusCode(response.StatusCode, response); + } + + [HttpPost("reset_password")] + public async Task> ResetPassword(UserLoginModel dto) + { + BaseResponse? response = null; + var loginInfo = new LoginDto(); + loginInfo.Email = dto.Email; + loginInfo.Password = dto.Password; + + switch (dto.UserType) + { + case "doctor": + var handlerDoctor = new DoctorResetPasswordHandler(_doctorRepository, _hashingAlgorithms); + response = await handlerDoctor.Handle(loginInfo).ConfigureAwait(false); + break; + case "patient": + var handlerPatient = new PatientResetPasswordHandler(_patientRepository, _hashingAlgorithms); + response = await handlerPatient.Handle(loginInfo).ConfigureAwait(false); + break; + default: + return new ActionResult(new BaseResponse + { + StatusCode = HttpStatusCodes.BadRequest, + Message = "Need user type.", + Data = null + }); + } + + if (response.StatusCode < HttpStatusCodes.BadRequest) + { + var body = _emailService.GenerateResetCredentialsEmailBody( + loginInfo.Email, loginInfo.Password); + await _emailService.SendEmailAsync(loginInfo.Email, "Password reset successfully!", body); + } + + return StatusCode(response.StatusCode, response); + } + + [HttpPost("refresh_token")] + public async Task> RefreshToken() + { + var authorizationHeader = Request.Headers["Authorization"].FirstOrDefault(); + if (string.IsNullOrEmpty(authorizationHeader) || !authorizationHeader.StartsWith("Bearer ")) + return StatusCode(HttpStatusCodes.BadRequest, new BaseResponse + { + StatusCode = HttpStatusCodes.BadRequest, + Message = "Invalid request header format.", + Data = null + }); + + var oldToken = authorizationHeader.Substring("Bearer ".Length).Trim(); + + if (!_jwtService.ValidateJwtToken(oldToken)) + return StatusCode(HttpStatusCodes.Unauthorized, new BaseResponse + { + StatusCode = HttpStatusCodes.Unauthorized, + Message = "Invalid JWT token.", + Data = null + }); + + var newToken = _jwtService.RefreshToken(oldToken); + return StatusCode(HttpStatusCodes.OK, new BaseResponse + { + StatusCode = HttpStatusCodes.OK, + Message = "Token refreshed successfully.", + Data = new { Token = newToken } + }); + } +} \ No newline at end of file diff --git a/backend/API/Controllers/ChatController.cs b/backend/API/Controllers/ChatController.cs index f27f92b..622f0ac 100644 --- a/backend/API/Controllers/ChatController.cs +++ b/backend/API/Controllers/ChatController.cs @@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc; namespace API.Controllers; +[Route("api/[controller]")] public class ChatController : BaseApiController { private readonly IChatMongoDbService _chatMongoDbService; diff --git a/backend/API/Controllers/DoctorsController.cs b/backend/API/Controllers/DoctorsController.cs index d94877e..d3212a8 100644 --- a/backend/API/Controllers/DoctorsController.cs +++ b/backend/API/Controllers/DoctorsController.cs @@ -1,8 +1,7 @@ using Application.Endpoints; -using Application.Endpoints.Doctors.Login; +using Application.Endpoints.Authorization.Doctor; using Application.Endpoints.Doctors.Profile; using Application.Endpoints.Doctors.Registration; -using Application.Endpoints.Doctors.ResetPassword; using Application.Services.Database.MongoDB; using Application.Services.Database.PostgreSQL; using Application.Services.Email; @@ -18,17 +17,15 @@ namespace API.Controllers; public class DoctorsController : ControllerBase { private readonly IAppointmentsMongoDbService _appointmentsMongoDbService; - private readonly IDoctorRepository _database; + private readonly IDoctorRepository _doctorRepository; private readonly IHashingAlgorithms _hashingAlgorithms; - private readonly IJwtService _jwtService; private readonly IEmailService _emailService; - public DoctorsController(IDoctorRepository database, IHashingAlgorithms hashingAlgorithms, - IJwtService jwtService, IAppointmentsMongoDbService appointmentsMongoDbService, IEmailService emailService) + public DoctorsController(IDoctorRepository doctorRepository, IHashingAlgorithms hashingAlgorithms, + IAppointmentsMongoDbService appointmentsMongoDbService, IEmailService emailService) { - _database = database; + _doctorRepository = doctorRepository; _hashingAlgorithms = hashingAlgorithms; - _jwtService = jwtService; _appointmentsMongoDbService = appointmentsMongoDbService; _emailService = emailService; } @@ -36,7 +33,7 @@ public class DoctorsController : ControllerBase [HttpPost("register")] public async Task> Register(DoctorRegistrationDto doctorRegistrationDto) { - var handler = new DoctorRegistrationHandler(_database, _hashingAlgorithms); + var handler = new DoctorRegistrationHandler(_doctorRepository, _hashingAlgorithms); var response = await handler.Handle(doctorRegistrationDto).ConfigureAwait(false); if (response.StatusCode < HttpStatusCodes.BadRequest) @@ -49,67 +46,10 @@ public class DoctorsController : ControllerBase return StatusCode(response.StatusCode, response); } - [HttpPost("login")] - public async Task> Login(DoctorLoginDto doctorLoginDto) - { - var handler = new DoctorLoginHandler(_database, _hashingAlgorithms); - var response = await handler.Handle(doctorLoginDto).ConfigureAwait(false); - /* - if (response.Data != null) - { - Doctor doctor = (Doctor)response.Data; - var authToken = _jwtService.GenerateJwtToken(doctor.Email); - - HttpContext.Response.Headers.Add("Authorization", $"Bearer {authToken}"); - } - */ - - return StatusCode(response.StatusCode, response); - } - - [HttpPost("refresh_token")] - public async Task> RefreshToken() - { - var authorizationHeader = Request.Headers["Authorization"].FirstOrDefault(); - if (string.IsNullOrEmpty(authorizationHeader) || !authorizationHeader.StartsWith("Bearer ")) - return StatusCode(HttpStatusCodes.BadRequest, new BaseResponse - { - StatusCode = HttpStatusCodes.BadRequest, - Message = "Invalid request header format.", - Data = null - }); - - var oldToken = authorizationHeader.Substring("Bearer ".Length).Trim(); - - if (!_jwtService.ValidateJwtToken(oldToken)) - return StatusCode(HttpStatusCodes.Unauthorized, new BaseResponse - { - StatusCode = HttpStatusCodes.Unauthorized, - Message = "Invalid JWT token.", - Data = null - }); - - var newToken = _jwtService.RefreshToken(oldToken); - return StatusCode(HttpStatusCodes.OK, new BaseResponse - { - StatusCode = HttpStatusCodes.OK, - Message = "Token refreshed successfully.", - Data = new { Token = newToken } - }); - } - - [HttpPost("reset_password")] - public async Task> ResetPassword(DoctorResetPasswordDto resetDoctorDto) - { - var handler = new DoctorResetPasswordHandler(_database, _hashingAlgorithms); - var response = await handler.Handle(resetDoctorDto).ConfigureAwait(false); - return StatusCode(response.StatusCode, response); - } - [HttpGet] public async Task> GetAllDoctors() { - var handler = new DoctorProfileHandler(_database, _hashingAlgorithms); + var handler = new DoctorProfileHandler(_doctorRepository, _hashingAlgorithms); var response = await handler.HandleGetAll(); return StatusCode(response.StatusCode, response); } @@ -117,7 +57,7 @@ public class DoctorsController : ControllerBase [HttpGet("{id}")] public async Task> GetDoctor(Guid id) { - var handler = new DoctorProfileHandler(_database, _hashingAlgorithms); + var handler = new DoctorProfileHandler(_doctorRepository, _hashingAlgorithms); var response = await handler.HandleGet(id); return StatusCode(response.StatusCode, response); } @@ -125,7 +65,7 @@ public class DoctorsController : ControllerBase [HttpPut] public async Task> UpdateDoctorProfile(DoctorProfileUpdateDto doctorUpdateDto) { - var handler = new DoctorProfileHandler(_database, _hashingAlgorithms); + var handler = new DoctorProfileHandler(_doctorRepository, _hashingAlgorithms); var response = await handler.HandleUpdate(doctorUpdateDto).ConfigureAwait(false); return StatusCode(response.StatusCode, response); } @@ -133,7 +73,7 @@ public class DoctorsController : ControllerBase [HttpDelete("{id}")] public async Task> DeleteDoctorProfile(Guid id) { - var handler = new DoctorProfileHandler(_database, _hashingAlgorithms); + var handler = new DoctorProfileHandler(_doctorRepository, _hashingAlgorithms); var response = await handler.HandleDelete(id).ConfigureAwait(false); if (response.StatusCode < HttpStatusCodes.BadRequest) DeleteDoctorAppointments(id); diff --git a/backend/API/Controllers/PatientsController.cs b/backend/API/Controllers/PatientsController.cs index 6b6850b..2805a06 100644 --- a/backend/API/Controllers/PatientsController.cs +++ b/backend/API/Controllers/PatientsController.cs @@ -1,8 +1,6 @@ using Application.Endpoints; -using Application.Endpoints.Patients.Login; using Application.Endpoints.Patients.Profile; using Application.Endpoints.Patients.Registration; -using Application.Endpoints.Patients.ResetPassword; using Application.Services.Database.PostgreSQL; using Application.Services.HashingAlgorithms; using Application.Services.Email; @@ -17,17 +15,15 @@ namespace API.Controllers; public class PatientsController : ControllerBase { private readonly IHashingAlgorithms _hashingAlgorithms; - private readonly IJwtService _jwtService; private readonly IMedicalHistoryRepository _medicalHistory; private readonly IPatientRepository _patientRepository; private readonly IEmailService _emailService; public PatientsController(IPatientRepository patientRepository, IHashingAlgorithms hashingAlgorithms, - IJwtService jwtService, IMedicalHistoryRepository medicalHistory, IEmailService emailService) + IMedicalHistoryRepository medicalHistory, IEmailService emailService) { _patientRepository = patientRepository; _hashingAlgorithms = hashingAlgorithms; - _jwtService = jwtService; _medicalHistory = medicalHistory; _emailService = emailService; } @@ -40,65 +36,10 @@ public class PatientsController : ControllerBase return StatusCode(response.StatusCode, response); } - [HttpGet("{id}")] - public async Task> GetPatient(Guid id) - { - var handler = new PatientProfileHandler(_patientRepository, _hashingAlgorithms); - var response = await handler.HandleGet(id); - return StatusCode(response.StatusCode, response); - } - - [HttpPost("login")] - public async Task> Login(PatientLoginDto patientLoginDto) - { - var handler = new PatientLoginHandler(_patientRepository); - var response = await handler.Handle(patientLoginDto).ConfigureAwait(false); - /* - if (response.Data != null) - { - Patient patient = (Patient)response.Data; - var authToken = _jwtService.GenerateJwtToken(patient.Email); - - HttpContext.Response.Headers.Add("Authorization", $"Bearer {authToken}"); - } - */ - return StatusCode(response.StatusCode, response); - } - - [HttpPost("refresh_token")] - public async Task> RefreshToken() - { - var authorizationHeader = Request.Headers["Authorization"].FirstOrDefault(); - if (string.IsNullOrEmpty(authorizationHeader) || !authorizationHeader.StartsWith("Bearer ")) - return StatusCode(HttpStatusCodes.BadRequest, new BaseResponse - { - StatusCode = HttpStatusCodes.BadRequest, - Message = "Invalid request header format.", - Data = null - }); - - var oldToken = authorizationHeader.Substring("Bearer ".Length).Trim(); - - if (!_jwtService.ValidateJwtToken(oldToken)) - return StatusCode(HttpStatusCodes.Unauthorized, new BaseResponse - { - StatusCode = HttpStatusCodes.Unauthorized, - Message = "Invalid JWT token.", - Data = null - }); - - var newToken = _jwtService.RefreshToken(oldToken); - return StatusCode(HttpStatusCodes.OK, new BaseResponse - { - StatusCode = HttpStatusCodes.OK, - Message = "Token refreshed successfully.", - Data = new { Token = newToken } - }); - } - [HttpPost("register")] public async Task> Register(PatientRegistrationDto patientRegistrationDto) { + Console.WriteLine("Esti aici"); var handler = new PatientRegistrationHandler(_patientRepository, _hashingAlgorithms); var response = await handler.Handle(patientRegistrationDto).ConfigureAwait(false); @@ -111,12 +52,12 @@ public class PatientsController : ControllerBase return StatusCode(response.StatusCode, response); } - - [HttpPost("reset_password")] - public async Task> ResetPassword(PatientResetPasswordDto patientResetPasswordDto) + + [HttpGet("{id}")] + public async Task> GetPatient(Guid id) { - var handler = new PatientResetPasswordHandler(_patientRepository, _hashingAlgorithms); - var response = await handler.Handle(patientResetPasswordDto).ConfigureAwait(false); + var handler = new PatientProfileHandler(_patientRepository, _hashingAlgorithms); + var response = await handler.HandleGet(id); return StatusCode(response.StatusCode, response); } diff --git a/backend/API/Middlewares/JwtMiddleware.cs b/backend/API/Middlewares/JwtMiddleware.cs index 6f78518..01de0ce 100644 --- a/backend/API/Middlewares/JwtMiddleware.cs +++ b/backend/API/Middlewares/JwtMiddleware.cs @@ -18,17 +18,19 @@ public class JwtMiddleware public async Task Invoke(HttpContext context) { var path = context.Request.Path.ToString().ToLower(); - - // Define the paths that should bypass JWT validation var bypassPaths = new[] { - "/api/doctors/login", + "/api/authorization/login", "/api/doctors/register", - "/api/patients/login", - "/api/patients/register" + "/api/patients/register", + "/api/authorization/reset_password" }; - if (!bypassPaths.Contains(path)) + if (bypassPaths.Contains(path)) + { + await _next(context); + } + else { var token = context.Request.Headers["Authorization"].FirstOrDefault()?.Split(" ").Last(); if (token != null && _jwtService.ValidateJwtToken(token)) diff --git a/backend/API/Program.cs b/backend/API/Program.cs index 2f3b9f3..f8c2721 100644 --- a/backend/API/Program.cs +++ b/backend/API/Program.cs @@ -6,6 +6,18 @@ using Microsoft.OpenApi.Models; var builder = WebApplication.CreateBuilder(args); +builder.Services.AddCors(options => +{ + options.AddPolicy("AllowAll", + builder => + { + builder.AllowAnyOrigin() + .AllowAnyMethod() + .AllowAnyHeader() + .WithExposedHeaders("*"); // This exposes all headers + }); +}); + builder.Services.AddControllers(); builder.Services.AddInfrastructureServices(builder.Configuration); @@ -38,33 +50,20 @@ builder.Services.AddSwaggerGen(c => var app = builder.Build(); -// Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); } +app.UseCors("AllowAll"); app.UseHttpsRedirection(); - -//builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) -// .AddJwtBearer(options => -// { -// options.TokenValidationParameters = new TokenValidationParameters -// { -// ValidateIssuerSigningKey = true, -// IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Jwt:SecretKey"])), -// ValidateIssuer = false, -// ValidateAudience = false, -// ClockSkew = TimeSpan.Zero -// }; -// }); - app.MapControllers(); // Middlewares app.UseMiddleware(); app.UseMiddleware(); +app.UseMiddleware(); using (var scope = app.Services.CreateScope()) { diff --git a/backend/API/Properties/launchSettings.json b/backend/API/Properties/launchSettings.json index d6f2263..83d7e9c 100644 --- a/backend/API/Properties/launchSettings.json +++ b/backend/API/Properties/launchSettings.json @@ -4,27 +4,27 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:45054", - "sslPort": 0 + "applicationUrl": "http://localhost:5000", + "sslPort": 5001 } }, "profiles": { "http": { "commandName": "Project", "dotnetRunMessages": true, - "launchBrowser": true, + "launchBrowser": false, "launchUrl": "swagger", - "applicationUrl": "http://localhost:5151", + "applicationUrl": "http://localhost:5000;https://localhost:5001", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Production" } }, "IIS Express": { "commandName": "IISExpress", - "launchBrowser": true, + "launchBrowser": false, "launchUrl": "swagger", "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" + "ASPNETCORE_ENVIRONMENT": "Production" } } } diff --git a/backend/API/appsettings.json b/backend/API/appsettings.json index a18d26e..b00f26c 100644 --- a/backend/API/appsettings.json +++ b/backend/API/appsettings.json @@ -6,7 +6,7 @@ } }, "ConnectionStrings": { - "HealthcareManagerDatabase": "Host=34.39.24.11;Database=HealthcareManager;Username=postgres;Password=postgres;", + "HealthcareManagerDatabase": "Host=surus.db.elephantsql.com;Database=newbwuyu;Username=newbwuyu;Password=0end9Ixqo9PeTE4HVslX7_FVwruEhFf-;", "MongoDBConnection": "mongodb+srv://andrei_cerbu:andrei@cluster0.v80skg6.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0" }, "HealthcareManagerDatabase": { @@ -19,7 +19,7 @@ "ApiKey": "testapikey" }, "Jwt": { - "SecretKey": "HealthcareManagerJwtKey", + "SecretKey": "f76bf7dc6e8a260f725f8a50ef9a8c4bd08ba2ae38e3b51d77d66617d1d6b7c0", "Issuer": "HealthcareManager", "Audience": "HealthCareManagerUsers", "ExpirationTime": 1440 @@ -32,12 +32,5 @@ "UserName": "andreimihneacerbu@gmail.com", "Password": "zpK3w71LkNa0sGt6" }, - "AllowedHosts": "*", - "Kestrel": { - "Endpoints": { - "Http": { - "Url": "http://*:80" - } - } - } + "AllowedHosts": "*" } diff --git a/backend/API/bin/Debug/net8.0/API.dll b/backend/API/bin/Debug/net8.0/API.dll index 72b9964..179e171 100644 Binary files a/backend/API/bin/Debug/net8.0/API.dll and b/backend/API/bin/Debug/net8.0/API.dll differ diff --git a/backend/API/bin/Debug/net8.0/API.exe b/backend/API/bin/Debug/net8.0/API.exe index 79b023a..08c7320 100644 Binary files a/backend/API/bin/Debug/net8.0/API.exe and b/backend/API/bin/Debug/net8.0/API.exe differ diff --git a/backend/API/bin/Debug/net8.0/API.pdb b/backend/API/bin/Debug/net8.0/API.pdb index 9491066..191ea34 100644 Binary files a/backend/API/bin/Debug/net8.0/API.pdb and b/backend/API/bin/Debug/net8.0/API.pdb differ diff --git a/backend/API/bin/Debug/net8.0/Application.dll b/backend/API/bin/Debug/net8.0/Application.dll index d5f2864..d9570ad 100644 Binary files a/backend/API/bin/Debug/net8.0/Application.dll and b/backend/API/bin/Debug/net8.0/Application.dll differ diff --git a/backend/API/bin/Debug/net8.0/Application.pdb b/backend/API/bin/Debug/net8.0/Application.pdb index 598c982..0de85f2 100644 Binary files a/backend/API/bin/Debug/net8.0/Application.pdb and b/backend/API/bin/Debug/net8.0/Application.pdb differ diff --git a/backend/API/bin/Debug/net8.0/Core.dll b/backend/API/bin/Debug/net8.0/Core.dll index 2d5ca28..7e1e95e 100644 Binary files a/backend/API/bin/Debug/net8.0/Core.dll and b/backend/API/bin/Debug/net8.0/Core.dll differ diff --git a/backend/API/bin/Debug/net8.0/Core.pdb b/backend/API/bin/Debug/net8.0/Core.pdb index 07208af..a45b614 100644 Binary files a/backend/API/bin/Debug/net8.0/Core.pdb and b/backend/API/bin/Debug/net8.0/Core.pdb differ diff --git a/backend/API/bin/Debug/net8.0/Infrastructure.dll b/backend/API/bin/Debug/net8.0/Infrastructure.dll index 415c18b..2e699c0 100644 Binary files a/backend/API/bin/Debug/net8.0/Infrastructure.dll and b/backend/API/bin/Debug/net8.0/Infrastructure.dll differ diff --git a/backend/API/bin/Debug/net8.0/Infrastructure.pdb b/backend/API/bin/Debug/net8.0/Infrastructure.pdb index 394efdf..c5f907f 100644 Binary files a/backend/API/bin/Debug/net8.0/Infrastructure.pdb and b/backend/API/bin/Debug/net8.0/Infrastructure.pdb differ diff --git a/backend/API/bin/Debug/net8.0/appsettings.json b/backend/API/bin/Debug/net8.0/appsettings.json index a18d26e..b00f26c 100644 --- a/backend/API/bin/Debug/net8.0/appsettings.json +++ b/backend/API/bin/Debug/net8.0/appsettings.json @@ -6,7 +6,7 @@ } }, "ConnectionStrings": { - "HealthcareManagerDatabase": "Host=34.39.24.11;Database=HealthcareManager;Username=postgres;Password=postgres;", + "HealthcareManagerDatabase": "Host=surus.db.elephantsql.com;Database=newbwuyu;Username=newbwuyu;Password=0end9Ixqo9PeTE4HVslX7_FVwruEhFf-;", "MongoDBConnection": "mongodb+srv://andrei_cerbu:andrei@cluster0.v80skg6.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0" }, "HealthcareManagerDatabase": { @@ -19,7 +19,7 @@ "ApiKey": "testapikey" }, "Jwt": { - "SecretKey": "HealthcareManagerJwtKey", + "SecretKey": "f76bf7dc6e8a260f725f8a50ef9a8c4bd08ba2ae38e3b51d77d66617d1d6b7c0", "Issuer": "HealthcareManager", "Audience": "HealthCareManagerUsers", "ExpirationTime": 1440 @@ -32,12 +32,5 @@ "UserName": "andreimihneacerbu@gmail.com", "Password": "zpK3w71LkNa0sGt6" }, - "AllowedHosts": "*", - "Kestrel": { - "Endpoints": { - "Http": { - "Url": "http://*:80" - } - } - } + "AllowedHosts": "*" } diff --git a/backend/API/obj/API.csproj.nuget.dgspec.json b/backend/API/obj/API.csproj.nuget.dgspec.json index 83c6210..d9fb73f 100644 --- a/backend/API/obj/API.csproj.nuget.dgspec.json +++ b/backend/API/obj/API.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj": {} + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj": {} }, "projects": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj", "projectName": "API", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -26,11 +26,11 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj" }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj" } } } @@ -77,14 +77,14 @@ } } }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "projectName": "Application", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -99,8 +99,8 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj" } } } @@ -144,14 +144,14 @@ } } }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "projectName": "Core", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -203,14 +203,14 @@ } } }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj", "projectName": "Infrastructure", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -225,11 +225,11 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj" }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj" } } } diff --git a/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs b/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs index 9b04666..15c1777 100644 --- a/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs +++ b/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("API")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d03c0ea4308c032d708d3ee63f648b10811c65f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("API")] [assembly: System.Reflection.AssemblyTitleAttribute("API")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache b/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache index b171701..6edf5ac 100644 --- a/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache +++ b/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache @@ -1 +1 @@ -9da6326faa16b70419b8bad27961193604ad75fcbf0f437bde7752d1858a93b2 +7cf0cf1bc0c1bb1fa8ec578557b749a7cc57ef8cae429498fee10b33ff11b247 diff --git a/backend/API/obj/Debug/net8.0/API.GeneratedMSBuildEditorConfig.editorconfig b/backend/API/obj/Debug/net8.0/API.GeneratedMSBuildEditorConfig.editorconfig index b620701..97d9755 100644 --- a/backend/API/obj/Debug/net8.0/API.GeneratedMSBuildEditorConfig.editorconfig +++ b/backend/API/obj/Debug/net8.0/API.GeneratedMSBuildEditorConfig.editorconfig @@ -9,11 +9,11 @@ build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = API build_property.RootNamespace = API -build_property.ProjectDir = C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\ +build_property.ProjectDir = C:\Users\Andrei Cerbu\Desktop\backend\API\ build_property.EnableComHosting = build_property.EnableGeneratedComInterfaceComImportInterop = build_property.RazorLangVersion = 8.0 build_property.SupportLocalizedComponentNames = build_property.GenerateRazorMetadataSourceChecksumAttributes = -build_property.MSBuildProjectDirectory = C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API +build_property.MSBuildProjectDirectory = C:\Users\Andrei Cerbu\Desktop\backend\API build_property._RazorSourceGeneratorDebug = diff --git a/backend/API/obj/Debug/net8.0/API.MvcApplicationPartsAssemblyInfo.cs b/backend/API/obj/Debug/net8.0/API.MvcApplicationPartsAssemblyInfo.cs index 5c337f8..43d96a6 100644 --- a/backend/API/obj/Debug/net8.0/API.MvcApplicationPartsAssemblyInfo.cs +++ b/backend/API/obj/Debug/net8.0/API.MvcApplicationPartsAssemblyInfo.cs @@ -1,6 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/backend/API/obj/Debug/net8.0/API.assets.cache b/backend/API/obj/Debug/net8.0/API.assets.cache index 33816ec..15cb82d 100644 Binary files a/backend/API/obj/Debug/net8.0/API.assets.cache and b/backend/API/obj/Debug/net8.0/API.assets.cache differ diff --git a/backend/API/obj/Debug/net8.0/API.csproj.AssemblyReference.cache b/backend/API/obj/Debug/net8.0/API.csproj.AssemblyReference.cache index cea7f2d..b711c48 100644 Binary files a/backend/API/obj/Debug/net8.0/API.csproj.AssemblyReference.cache and b/backend/API/obj/Debug/net8.0/API.csproj.AssemblyReference.cache differ diff --git a/backend/API/obj/Debug/net8.0/API.csproj.Up2Date b/backend/API/obj/Debug/net8.0/API.csproj.CopyComplete similarity index 100% rename from backend/API/obj/Debug/net8.0/API.csproj.Up2Date rename to backend/API/obj/Debug/net8.0/API.csproj.CopyComplete diff --git a/backend/API/obj/Debug/net8.0/API.csproj.CoreCompileInputs.cache b/backend/API/obj/Debug/net8.0/API.csproj.CoreCompileInputs.cache index 3367bf6..14bbad1 100644 --- a/backend/API/obj/Debug/net8.0/API.csproj.CoreCompileInputs.cache +++ b/backend/API/obj/Debug/net8.0/API.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -8e2d63c970dcfcf7fa32f83c388855a8383f3ed35cc314f5089a54d4a7d74fa6 +543aafe77e186bf916a0691cf74e95e5f521913f1cb0557f77fb0e0478c5a172 diff --git a/backend/API/obj/Debug/net8.0/API.csproj.FileListAbsolute.txt b/backend/API/obj/Debug/net8.0/API.csproj.FileListAbsolute.txt index a05d6c6..c6b9e87 100644 --- a/backend/API/obj/Debug/net8.0/API.csproj.FileListAbsolute.txt +++ b/backend/API/obj/Debug/net8.0/API.csproj.FileListAbsolute.txt @@ -64,3 +64,133 @@ C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Tokens.dll C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\System.IdentityModel.Tokens.Jwt.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\appsettings.Development.json +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\appsettings.json +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\API.exe +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\API.deps.json +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\API.runtimeconfig.json +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\API.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\API.pdb +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\AWSSDK.Core.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\AWSSDK.SecurityToken.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\DnsClient.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\FluentValidation.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.AspNetCore.Authentication.JwtBearer.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.EntityFrameworkCore.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.EntityFrameworkCore.Abstractions.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.EntityFrameworkCore.Relational.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Abstractions.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.JsonWebTokens.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Logging.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Protocols.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Tokens.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Microsoft.OpenApi.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\MongoDB.Bson.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\MongoDB.Driver.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\MongoDB.Driver.Core.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\MongoDB.Libmongocrypt.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Npgsql.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Npgsql.EntityFrameworkCore.PostgreSQL.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\SharpCompress.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Snappier.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Swashbuckle.AspNetCore.Swagger.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Swashbuckle.AspNetCore.SwaggerGen.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Swashbuckle.AspNetCore.SwaggerUI.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\System.IdentityModel.Tokens.Jwt.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\ZstdSharp.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\runtimes\linux\native\libmongocrypt.so +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\runtimes\osx\native\libmongocrypt.dylib +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\runtimes\win\native\mongocrypt.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Application.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Infrastructure.pdb +C:\Users\Andrei Cerbu\Desktop\backend\API\bin\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.AssemblyInfoInputs.cache +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.AssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.csproj.CoreCompileInputs.cache +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.MvcApplicationPartsAssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.MvcApplicationPartsAssemblyInfo.cache +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\staticwebassets.build.json +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\staticwebassets.development.json +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\staticwebassets\msbuild.API.Microsoft.AspNetCore.StaticWebAssets.props +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\staticwebassets\msbuild.build.API.props +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\staticwebassets\msbuild.buildMultiTargeting.API.props +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\staticwebassets\msbuild.buildTransitive.API.props +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\staticwebassets.pack.json +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\scopedcss\bundle\API.styles.css +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\refint\API.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.pdb +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.genruntimeconfig.cache +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\ref\API.dll +C:\Users\Andrei Cerbu\Desktop\backend\API\obj\Debug\net8.0\API.csproj.CopyComplete +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\appsettings.Development.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\appsettings.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\API.exe +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\API.deps.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\API.runtimeconfig.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\API.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\API.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\AWSSDK.Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\AWSSDK.SecurityToken.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\DnsClient.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\FluentValidation.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.AspNetCore.Authentication.JwtBearer.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.EntityFrameworkCore.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.EntityFrameworkCore.Abstractions.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.EntityFrameworkCore.Relational.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Abstractions.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.JsonWebTokens.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Logging.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Protocols.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Tokens.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Microsoft.OpenApi.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\MongoDB.Bson.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\MongoDB.Driver.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\MongoDB.Driver.Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\MongoDB.Libmongocrypt.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Npgsql.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Npgsql.EntityFrameworkCore.PostgreSQL.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\SharpCompress.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Snappier.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Swashbuckle.AspNetCore.Swagger.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Swashbuckle.AspNetCore.SwaggerGen.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Swashbuckle.AspNetCore.SwaggerUI.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\System.IdentityModel.Tokens.Jwt.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\ZstdSharp.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\runtimes\linux\native\libmongocrypt.so +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\runtimes\osx\native\libmongocrypt.dylib +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\runtimes\win\native\mongocrypt.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Application.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Infrastructure.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\bin\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.AssemblyInfoInputs.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.AssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.csproj.CoreCompileInputs.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.MvcApplicationPartsAssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.MvcApplicationPartsAssemblyInfo.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\staticwebassets.build.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\staticwebassets.development.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\staticwebassets\msbuild.API.Microsoft.AspNetCore.StaticWebAssets.props +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\staticwebassets\msbuild.build.API.props +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\staticwebassets\msbuild.buildMultiTargeting.API.props +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\staticwebassets\msbuild.buildTransitive.API.props +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\staticwebassets.pack.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\scopedcss\bundle\API.styles.css +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.csproj.CopyComplete +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\refint\API.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\API.genruntimeconfig.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\API\obj\Debug\net8.0\ref\API.dll diff --git a/backend/API/obj/Debug/net8.0/API.dll b/backend/API/obj/Debug/net8.0/API.dll index 72b9964..179e171 100644 Binary files a/backend/API/obj/Debug/net8.0/API.dll and b/backend/API/obj/Debug/net8.0/API.dll differ diff --git a/backend/API/obj/Debug/net8.0/API.genruntimeconfig.cache b/backend/API/obj/Debug/net8.0/API.genruntimeconfig.cache index bdbdb9d..3cc39af 100644 --- a/backend/API/obj/Debug/net8.0/API.genruntimeconfig.cache +++ b/backend/API/obj/Debug/net8.0/API.genruntimeconfig.cache @@ -1 +1 @@ -cf7697bb57c8ed401672a12b2bb138875f61be594e170984d2a891dbe0535240 +2de96076d5aaf384237cae33070350f9934f673c447a954dabe9d9fb88b31d32 diff --git a/backend/API/obj/Debug/net8.0/API.pdb b/backend/API/obj/Debug/net8.0/API.pdb index 9491066..191ea34 100644 Binary files a/backend/API/obj/Debug/net8.0/API.pdb and b/backend/API/obj/Debug/net8.0/API.pdb differ diff --git a/backend/API/obj/Debug/net8.0/API.sourcelink.json b/backend/API/obj/Debug/net8.0/API.sourcelink.json deleted file mode 100644 index 6807585..0000000 --- a/backend/API/obj/Debug/net8.0/API.sourcelink.json +++ /dev/null @@ -1 +0,0 @@ -{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/0d03c0ea4308c032d708d3ee63f648b10811c65f/*"}} \ No newline at end of file diff --git a/backend/API/obj/Debug/net8.0/apphost.exe b/backend/API/obj/Debug/net8.0/apphost.exe index 79b023a..08c7320 100644 Binary files a/backend/API/obj/Debug/net8.0/apphost.exe and b/backend/API/obj/Debug/net8.0/apphost.exe differ diff --git a/backend/API/obj/Debug/net8.0/ref/API.dll b/backend/API/obj/Debug/net8.0/ref/API.dll index 9b0aa25..bed7f05 100644 Binary files a/backend/API/obj/Debug/net8.0/ref/API.dll and b/backend/API/obj/Debug/net8.0/ref/API.dll differ diff --git a/backend/API/obj/Debug/net8.0/refint/API.dll b/backend/API/obj/Debug/net8.0/refint/API.dll index 9b0aa25..bed7f05 100644 Binary files a/backend/API/obj/Debug/net8.0/refint/API.dll and b/backend/API/obj/Debug/net8.0/refint/API.dll differ diff --git a/backend/API/obj/project.assets.json b/backend/API/obj/project.assets.json index 441667d..c684d08 100644 --- a/backend/API/obj/project.assets.json +++ b/backend/API/obj/project.assets.json @@ -2866,11 +2866,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj", "projectName": "API", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -2885,11 +2885,11 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj" }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj" } } } diff --git a/backend/API/obj/project.nuget.cache b/backend/API/obj/project.nuget.cache index 476d4dc..867d24b 100644 --- a/backend/API/obj/project.nuget.cache +++ b/backend/API/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "H5Qo0sozwr+dtjWKUvuynj4zk8X++aQJuu1j0FXoS/GLj1KwbgdyFric4d5FbEvjaO4v4r35BCqsZQZKD1Euvg==", + "dgSpecHash": "JqPotdhan1pGOwRO5KHGDthiAw64a1ixY/i/JqNC1km5Hr2KgqRZKCjDebBEOZZEZ/9ZLHJQiW7GNu2jpY81ZA==", "success": true, - "projectFilePath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj", + "projectFilePath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj", "expectedPackageFiles": [ "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\awssdk.core\\3.7.100.14\\awssdk.core.3.7.100.14.nupkg.sha512", "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\awssdk.securitytoken\\3.7.100.14\\awssdk.securitytoken.3.7.100.14.nupkg.sha512", diff --git a/backend/API/obj/project.packagespec.json b/backend/API/obj/project.packagespec.json index 66d0374..35aa32a 100644 --- a/backend/API/obj/project.packagespec.json +++ b/backend/API/obj/project.packagespec.json @@ -1 +1 @@ -"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj","projectName":"API","projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\API.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\API\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj"},"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Microsoft.AspNetCore.Authentication.JwtBearer":{"target":"Package","version":"[8.0.3, )"},"Swashbuckle.AspNetCore":{"target":"Package","version":"[6.5.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.AspNetCore.App":{"privateAssets":"none"},"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file +"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj","projectName":"API","projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\API.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\API\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj"},"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Microsoft.AspNetCore.Authentication.JwtBearer":{"target":"Package","version":"[8.0.3, )"},"Swashbuckle.AspNetCore":{"target":"Package","version":"[6.5.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.AspNetCore.App":{"privateAssets":"none"},"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/backend/API/obj/rider.project.model.nuget.info b/backend/API/obj/rider.project.model.nuget.info index b11d575..94e110d 100644 --- a/backend/API/obj/rider.project.model.nuget.info +++ b/backend/API/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17125685577964752 \ No newline at end of file +17127155176611080 \ No newline at end of file diff --git a/backend/API/obj/rider.project.restore.info b/backend/API/obj/rider.project.restore.info index b11d575..94e110d 100644 --- a/backend/API/obj/rider.project.restore.info +++ b/backend/API/obj/rider.project.restore.info @@ -1 +1 @@ -17125685577964752 \ No newline at end of file +17127155176611080 \ No newline at end of file diff --git a/backend/Application/Endpoints/Doctors/Login/DoctorLoginHandler.cs b/backend/Application/Endpoints/Authorization/Doctor/DoctorLoginHandler.cs similarity index 83% rename from backend/Application/Endpoints/Doctors/Login/DoctorLoginHandler.cs rename to backend/Application/Endpoints/Authorization/Doctor/DoctorLoginHandler.cs index 06989d7..93d7764 100644 --- a/backend/Application/Endpoints/Doctors/Login/DoctorLoginHandler.cs +++ b/backend/Application/Endpoints/Authorization/Doctor/DoctorLoginHandler.cs @@ -1,7 +1,7 @@ using Application.Services.Database.PostgreSQL; using Application.Services.HashingAlgorithms; -namespace Application.Endpoints.Doctors.Login; +namespace Application.Endpoints.Authorization.Doctor; public class DoctorLoginHandler { @@ -14,7 +14,7 @@ public class DoctorLoginHandler _hashingAlgorithms = hashingAlgorithms; } - public async Task Handle(DoctorLoginDto loginDTO) + public async Task Handle(LoginDto loginDTO) { loginDTO.Password = _hashingAlgorithms.SHA256Algorithm(loginDTO.Password); @@ -22,12 +22,15 @@ public class DoctorLoginHandler var validationResult = await validation.ValidateAsync(loginDTO); if (validationResult.IsValid) + { + var doctor = await _database.FindByEmailAsync(loginDTO.Email); return new BaseResponse { StatusCode = HttpStatusCodes.OK, Message = "Authentication successful", - Data = null + Data = doctor }; + } var firstError = validationResult.Errors.FirstOrDefault(); var errorCode = int.TryParse(firstError.ErrorCode, out var code) ? code : -1; diff --git a/backend/Application/Endpoints/Authorization/Doctor/DoctorLoginValidation.cs b/backend/Application/Endpoints/Authorization/Doctor/DoctorLoginValidation.cs new file mode 100644 index 0000000..d3e0654 --- /dev/null +++ b/backend/Application/Endpoints/Authorization/Doctor/DoctorLoginValidation.cs @@ -0,0 +1,33 @@ +using Application.Services.Database.PostgreSQL; +using FluentValidation; + +namespace Application.Endpoints.Authorization.Doctor; + +public class DoctorLoginValidation : AbstractValidator +{ + private readonly IDoctorRepository _doctorRepository; + + public DoctorLoginValidation(IDoctorRepository doctorRepository) + { + _doctorRepository = doctorRepository; + + RuleFor(x => x.Email) + .NotEmpty().WithMessage("Email is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .EmailAddress().WithMessage("Invalid email format.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()); + + RuleFor(x => x.Password) + .NotEmpty().WithMessage("Password is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .MinimumLength(8).WithMessage("Password must be at least 8 characters long.") + .WithErrorCode(HttpStatusCodes.BadRequest.ToString()); + + RuleFor(x => x) + .MustAsync(CredentialsMatch).WithMessage("Invalid credentials") + .WithErrorCode(HttpStatusCodes.Unauthorized.ToString()); + } + + private async Task CredentialsMatch(LoginDto dto, CancellationToken cancellationToken) + { + var code = await _doctorRepository.CredentialsMatch(dto.Email, dto.Password); + return code; + } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Doctors/ResetPassword/DoctorResetPasswordHandler.cs b/backend/Application/Endpoints/Authorization/Doctor/DoctorResetPasswordHandler.cs similarity index 90% rename from backend/Application/Endpoints/Doctors/ResetPassword/DoctorResetPasswordHandler.cs rename to backend/Application/Endpoints/Authorization/Doctor/DoctorResetPasswordHandler.cs index 2ce1d5d..d71e486 100644 --- a/backend/Application/Endpoints/Doctors/ResetPassword/DoctorResetPasswordHandler.cs +++ b/backend/Application/Endpoints/Authorization/Doctor/DoctorResetPasswordHandler.cs @@ -1,7 +1,7 @@ using Application.Services.Database.PostgreSQL; using Application.Services.HashingAlgorithms; -namespace Application.Endpoints.Doctors.ResetPassword; +namespace Application.Endpoints.Authorization.Doctor; public class DoctorResetPasswordHandler { @@ -14,9 +14,9 @@ public class DoctorResetPasswordHandler _hashingAlgorithms = hashingAlgorithms; } - public async Task Handle(DoctorResetPasswordDto resetDoctorDto) + public async Task Handle(LoginDto resetDoctorDto) { - var validation = new DoctorResetPasswordValidation(_doctorRepository); + var validation = new DoctorResetPasswordValidation(_doctorRepository, _hashingAlgorithms); var validationResult = await validation.ValidateAsync(resetDoctorDto); if (!validationResult.IsValid) diff --git a/backend/Application/Endpoints/Authorization/Doctor/DoctorResetPasswordValidation.cs b/backend/Application/Endpoints/Authorization/Doctor/DoctorResetPasswordValidation.cs new file mode 100644 index 0000000..694a890 --- /dev/null +++ b/backend/Application/Endpoints/Authorization/Doctor/DoctorResetPasswordValidation.cs @@ -0,0 +1,45 @@ +using System.Net; +using Application.Services.Database.PostgreSQL; +using Application.Services.HashingAlgorithms; +using FluentValidation; + +namespace Application.Endpoints.Authorization.Doctor; + +public class DoctorResetPasswordValidation : AbstractValidator +{ + private readonly IDoctorRepository _doctorRepository; + private readonly IHashingAlgorithms _hashingAlgorithms; + + public DoctorResetPasswordValidation(IDoctorRepository doctorRepository, IHashingAlgorithms hashingAlgorithms) + { + _doctorRepository = doctorRepository; + _hashingAlgorithms = hashingAlgorithms; + + RuleFor(x => x.Email) + .NotEmpty().WithMessage("Email is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .EmailAddress().WithMessage("Invalid email format.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .MustAsync(BeExistingDoctor).WithMessage("Patient with this email does not exist.") + .WithErrorCode(HttpStatusCodes.NotFound.ToString()); + + RuleFor(x => x.Password) + .NotEmpty().WithMessage("Password is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .WithErrorCode(HttpStatusCode.BadRequest.ToString()); + + RuleFor(x => x) + .MustAsync(BeDifferentFromOldPassword).WithMessage("Password can't be as the previous.") + .WithErrorCode(HttpStatusCode.BadRequest.ToString()).WithErrorCode(HttpStatusCodes.BadRequest.ToString()); + } + + private async Task BeExistingDoctor(string email, CancellationToken cancellationToken) + { + var doctor = await _doctorRepository.FindByEmailAsync(email); + return doctor != null; + } + + private async Task BeDifferentFromOldPassword(LoginDto dto, CancellationToken cancellationToken) + { + var currentPatient = await _doctorRepository.FindByEmailAsync(dto.Email); + return !_hashingAlgorithms.SHA256Algorithm(dto.Password) + .Equals(currentPatient?.Password, StringComparison.Ordinal); + } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Authorization/LoginDto.cs b/backend/Application/Endpoints/Authorization/LoginDto.cs new file mode 100644 index 0000000..070b9d6 --- /dev/null +++ b/backend/Application/Endpoints/Authorization/LoginDto.cs @@ -0,0 +1,7 @@ +namespace Application.Endpoints.Authorization; + +public class LoginDto +{ + public string Email; + public string Password; +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Patients/Login/PatientLoginHandler.cs b/backend/Application/Endpoints/Authorization/Patient/PatientLoginHandler.cs similarity index 51% rename from backend/Application/Endpoints/Patients/Login/PatientLoginHandler.cs rename to backend/Application/Endpoints/Authorization/Patient/PatientLoginHandler.cs index 32a6c21..1c6b4f0 100644 --- a/backend/Application/Endpoints/Patients/Login/PatientLoginHandler.cs +++ b/backend/Application/Endpoints/Authorization/Patient/PatientLoginHandler.cs @@ -1,28 +1,34 @@ using Application.Services.Database.PostgreSQL; +using Application.Services.HashingAlgorithms; -namespace Application.Endpoints.Patients.Login; +namespace Application.Endpoints.Authorization.Patient; public class PatientLoginHandler { - private readonly IPatientRepository _database; + private readonly IPatientRepository _patientRepository; + private readonly IHashingAlgorithms _hashingAlgorithms; - public PatientLoginHandler(IPatientRepository database) + public PatientLoginHandler(IPatientRepository patientRepository, IHashingAlgorithms hashingAlgorithms) { - _database = database; + _patientRepository = patientRepository; + _hashingAlgorithms = hashingAlgorithms; } - public async Task Handle(PatientLoginDto loginDTO) + public async Task Handle(LoginDto loginDTO) { - var validation = new PatientLoginValidation(_database); + var validation = new PatientLoginValidation(_patientRepository, _hashingAlgorithms); var validationResult = await validation.ValidateAsync(loginDTO); if (validationResult.IsValid) + { + var patient = await _patientRepository.FindByEmailAsync(loginDTO.Email); return new BaseResponse { StatusCode = HttpStatusCodes.OK, Message = "Authentication successful", - Data = null + Data = patient }; + } var firstError = validationResult.Errors.FirstOrDefault(); var errorCode = int.TryParse(firstError.ErrorCode, out var code) ? code : -1; diff --git a/backend/Application/Endpoints/Authorization/Patient/PatientLoginValidation.cs b/backend/Application/Endpoints/Authorization/Patient/PatientLoginValidation.cs new file mode 100644 index 0000000..a74dbf6 --- /dev/null +++ b/backend/Application/Endpoints/Authorization/Patient/PatientLoginValidation.cs @@ -0,0 +1,37 @@ +using Application.Services.Database.PostgreSQL; +using Application.Services.HashingAlgorithms; +using FluentValidation; + +namespace Application.Endpoints.Authorization.Patient; + +public class PatientLoginValidation : AbstractValidator +{ + private readonly IPatientRepository _patientRepository; + private readonly IHashingAlgorithms _hashingAlgorithms; + + public PatientLoginValidation(IPatientRepository patientRepository, IHashingAlgorithms hashingAlgorithms) + { + _patientRepository = patientRepository; + _hashingAlgorithms = hashingAlgorithms; + + RuleFor(x => x.Email) + .NotEmpty().WithMessage("Email is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .EmailAddress().WithMessage("Invalid email format.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()); + + RuleFor(x => x.Password) + .NotEmpty().WithMessage("Password is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .MinimumLength(8).WithMessage("Password must be at least 8 characters long.") + .WithErrorCode(HttpStatusCodes.BadRequest.ToString()); + + RuleFor(x => x) + .MustAsync(CredentialsMatch).WithMessage("Invalid credentials") + .WithErrorCode(HttpStatusCodes.Unauthorized.ToString()); + } + + private async Task CredentialsMatch(LoginDto dto, CancellationToken cancellationToken) + { + var code = await _patientRepository.CredentialsMatch( + dto.Email, _hashingAlgorithms.SHA256Algorithm(dto.Password)); + return code; + } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Patients/ResetPassword/PatientResetPasswordHandler.cs b/backend/Application/Endpoints/Authorization/Patient/PatientResetPasswordHandler.cs similarity index 85% rename from backend/Application/Endpoints/Patients/ResetPassword/PatientResetPasswordHandler.cs rename to backend/Application/Endpoints/Authorization/Patient/PatientResetPasswordHandler.cs index 6073754..ef81101 100644 --- a/backend/Application/Endpoints/Patients/ResetPassword/PatientResetPasswordHandler.cs +++ b/backend/Application/Endpoints/Authorization/Patient/PatientResetPasswordHandler.cs @@ -1,7 +1,7 @@ using Application.Services.Database.PostgreSQL; using Application.Services.HashingAlgorithms; -namespace Application.Endpoints.Patients.ResetPassword; +namespace Application.Endpoints.Authorization.Patient; public class PatientResetPasswordHandler { @@ -14,10 +14,9 @@ public class PatientResetPasswordHandler _hashingAlgorithms = hashingAlgorithms; } - public async Task Handle(PatientResetPasswordDto patientResetPasswordDto) + public async Task Handle(LoginDto patientResetPasswordDto) { - patientResetPasswordDto.Password = _hashingAlgorithms.SHA256Algorithm(patientResetPasswordDto.Password); - var validation = new PatientResetPasswordValidation(_patientRepository); + var validation = new PatientResetPasswordValidation(_patientRepository, _hashingAlgorithms); var validationResult = await validation.ValidateAsync(patientResetPasswordDto); if (!validationResult.IsValid) diff --git a/backend/Application/Endpoints/Authorization/Patient/PatientResetPasswordValidation.cs b/backend/Application/Endpoints/Authorization/Patient/PatientResetPasswordValidation.cs new file mode 100644 index 0000000..d83d1bc --- /dev/null +++ b/backend/Application/Endpoints/Authorization/Patient/PatientResetPasswordValidation.cs @@ -0,0 +1,46 @@ +using System.Net; +using Application.Services.Database.PostgreSQL; +using Application.Services.HashingAlgorithms; +using FluentValidation; + +namespace Application.Endpoints.Authorization.Patient; + +public class PatientResetPasswordValidation : AbstractValidator +{ + private readonly IPatientRepository _patientRepository; + private readonly IHashingAlgorithms _hashingAlgorithms; + + public PatientResetPasswordValidation(IPatientRepository patientRepository, + IHashingAlgorithms hashingAlgorithms) + { + _patientRepository = patientRepository; + _hashingAlgorithms = hashingAlgorithms; + + RuleFor(x => x.Email) + .NotEmpty().WithMessage("Email is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .EmailAddress().WithMessage("Invalid email format.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .MustAsync(BeExistingPatient).WithMessage("Patient with this email does not exist.") + .WithErrorCode(HttpStatusCodes.NotFound.ToString()); + + RuleFor(x => x.Password) + .NotEmpty().WithMessage("Password is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .WithErrorCode(HttpStatusCode.BadRequest.ToString()); + + RuleFor(x => x) + .MustAsync(BeDifferentFromOldPassword).WithMessage("Password can't be as the previous.") + .WithErrorCode(HttpStatusCode.BadRequest.ToString()).WithErrorCode(HttpStatusCodes.BadRequest.ToString()); + } + + private async Task BeExistingPatient(string email, CancellationToken cancellationToken) + { + var patient = await _patientRepository.FindByEmailAsync(email); + return patient != null; + } + + private async Task BeDifferentFromOldPassword(LoginDto dto, CancellationToken cancellationToken) + { + var currentPatient = await _patientRepository.FindByEmailAsync(dto.Email); + return !_hashingAlgorithms.SHA256Algorithm(dto.Password) + .Equals(currentPatient?.Password, StringComparison.Ordinal); + } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Authorization/UserLoginDto.cs b/backend/Application/Endpoints/Authorization/UserLoginDto.cs new file mode 100644 index 0000000..8189eb9 --- /dev/null +++ b/backend/Application/Endpoints/Authorization/UserLoginDto.cs @@ -0,0 +1,8 @@ +namespace Application.Endpoints.Authorization; + +public class UserLoginModel +{ + public string? UserType { get; set; } + public string Email { get; set; } + public string Password { get; set; } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Doctors/Login/DoctorLoginDto.cs b/backend/Application/Endpoints/Doctors/Login/DoctorLoginDto.cs deleted file mode 100644 index 49f3f8c..0000000 --- a/backend/Application/Endpoints/Doctors/Login/DoctorLoginDto.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Application.Endpoints.Doctors.Login; - -public class DoctorLoginDto -{ - public string? Email { get; set; } - public string? Password { get; set; } -} \ No newline at end of file diff --git a/backend/Application/Endpoints/Doctors/Login/DoctorLoginValidation.cs b/backend/Application/Endpoints/Doctors/Login/DoctorLoginValidation.cs deleted file mode 100644 index 7e545eb..0000000 --- a/backend/Application/Endpoints/Doctors/Login/DoctorLoginValidation.cs +++ /dev/null @@ -1,38 +0,0 @@ -using Application.Services.Database.PostgreSQL; -using FluentValidation; - -namespace Application.Endpoints.Doctors.Login; - -public class DoctorLoginValidation : AbstractValidator -{ - private readonly IDoctorRepository _doctorRepository; - - public DoctorLoginValidation(IDoctorRepository doctorRepository) - { - _doctorRepository = doctorRepository; - - RuleFor(x => x.Email) - .NotEmpty().WithMessage("Email is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .EmailAddress().WithMessage("Invalid email format.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync(BeExistingDoctor).WithMessage("Doctor with this email does not exist.") - .WithErrorCode(HttpStatusCodes.NotFound.ToString()); - - RuleFor(x => x.Password) - .NotEmpty().WithMessage("Password is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync((dto, password, cancellationToken) => CredentialsMatch(dto.Email, password, cancellationToken)) - .WithMessage("Incorrect email or password.") - .WithErrorCode(HttpStatusCodes.Unauthorized.ToString()); - } - - private async Task BeExistingDoctor(string email, CancellationToken cancellationToken) - { - var doctor = await _doctorRepository.FindByEmailAsync(email); - return doctor != null; - } - - private async Task CredentialsMatch(string email, string password, CancellationToken cancellationToken) - { - var code = await _doctorRepository.CredentialsMatch(email, password); - return code; - } -} \ No newline at end of file diff --git a/backend/Application/Endpoints/Doctors/ResetPassword/DoctorLoginDto.cs b/backend/Application/Endpoints/Doctors/ResetPassword/DoctorLoginDto.cs deleted file mode 100644 index c9beaad..0000000 --- a/backend/Application/Endpoints/Doctors/ResetPassword/DoctorLoginDto.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Application.Endpoints.Doctors.ResetPassword; - -public class DoctorResetPasswordDto -{ - public string? Email { get; set; } - public string? Password { get; set; } -} \ No newline at end of file diff --git a/backend/Application/Endpoints/Doctors/ResetPassword/DoctorResetPasswordValidation.cs b/backend/Application/Endpoints/Doctors/ResetPassword/DoctorResetPasswordValidation.cs deleted file mode 100644 index 0c1a12f..0000000 --- a/backend/Application/Endpoints/Doctors/ResetPassword/DoctorResetPasswordValidation.cs +++ /dev/null @@ -1,42 +0,0 @@ -using Application.Services.Database.PostgreSQL; -using FluentValidation; - -namespace Application.Endpoints.Doctors.ResetPassword; - -public class DoctorResetPasswordValidation : AbstractValidator -{ - private readonly IDoctorRepository _doctorRepository; - - public DoctorResetPasswordValidation(IDoctorRepository doctorRepository) - { - _doctorRepository = doctorRepository; - - RuleFor(x => x.Email) - .NotEmpty().WithMessage("Email is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .EmailAddress().WithMessage("Invalid email format.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync(BeExistingDoctor).WithMessage("Doctor with this email does not exist.") - .WithErrorCode(HttpStatusCodes.NotFound.ToString()); - - RuleFor(x => x.Password) - .NotEmpty().WithMessage("Password is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MinimumLength(8).WithMessage("Password must be at least 8 characters long.") - .WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync((dto, password, context, cancellationToken) => - BeDifferentFromOldPassword(dto.Email, password, cancellationToken)) - .WithMessage("New password cannot be the same as old password.") - .WithErrorCode(HttpStatusCodes.BadRequest.ToString()); - } - - private async Task BeExistingDoctor(string email, CancellationToken cancellationToken) - { - var doctor = await _doctorRepository.FindByEmailAsync(email); - return doctor != null; - } - - private async Task BeDifferentFromOldPassword(string email, string newPassword, - CancellationToken cancellationToken) - { - var currentDoctor = await _doctorRepository.FindByEmailAsync(email); - return !newPassword.Equals(currentDoctor?.Password, StringComparison.Ordinal); - } -} \ No newline at end of file diff --git a/backend/Application/Endpoints/Patients/Login/PatientLoginDto.cs b/backend/Application/Endpoints/Patients/Login/PatientLoginDto.cs deleted file mode 100644 index 3264115..0000000 --- a/backend/Application/Endpoints/Patients/Login/PatientLoginDto.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Application.Endpoints.Patients.Login; - -public class PatientLoginDto -{ - public string? Email { get; set; } - public string? Password { get; set; } -} \ No newline at end of file diff --git a/backend/Application/Endpoints/Patients/Login/PatientLoginValidation.cs b/backend/Application/Endpoints/Patients/Login/PatientLoginValidation.cs deleted file mode 100644 index 20e8ad9..0000000 --- a/backend/Application/Endpoints/Patients/Login/PatientLoginValidation.cs +++ /dev/null @@ -1,31 +0,0 @@ -using Application.Services.Database.PostgreSQL; -using FluentValidation; - -namespace Application.Endpoints.Patients.Login; - -public class PatientLoginValidation : AbstractValidator -{ - private readonly IPatientRepository _patientRepository; - - public PatientLoginValidation(IPatientRepository patientRepository) - { - _patientRepository = patientRepository; - - RuleFor(x => x.Email) - .NotEmpty().WithMessage("Email is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .EmailAddress().WithMessage("Invalid email format.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync(BeExistingPatient).WithMessage("Patient with this email does not exist.") - .WithErrorCode(HttpStatusCodes.NotFound.ToString()); - - RuleFor(x => x.Password) - .NotEmpty().WithMessage("Password is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MinimumLength(8).WithMessage("Password must be at least 8 characters long.") - .WithErrorCode(HttpStatusCodes.BadRequest.ToString()); - } - - private async Task BeExistingPatient(string email, CancellationToken cancellationToken) - { - var patient = await _patientRepository.FindByEmailAsync(email); - return patient != null; - } -} \ No newline at end of file diff --git a/backend/Application/Endpoints/Patients/ResetPassword/PatientLoginDto.cs b/backend/Application/Endpoints/Patients/ResetPassword/PatientLoginDto.cs deleted file mode 100644 index 69921eb..0000000 --- a/backend/Application/Endpoints/Patients/ResetPassword/PatientLoginDto.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Application.Endpoints.Patients.ResetPassword; - -public class PatientResetPasswordDto -{ - public string? Email { get; set; } - public string? Password { get; set; } -} \ No newline at end of file diff --git a/backend/Application/Endpoints/Patients/ResetPassword/PatientResetPasswordValidation.cs b/backend/Application/Endpoints/Patients/ResetPassword/PatientResetPasswordValidation.cs deleted file mode 100644 index ecc037f..0000000 --- a/backend/Application/Endpoints/Patients/ResetPassword/PatientResetPasswordValidation.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Application.Services.Database.PostgreSQL; -using FluentValidation; - -namespace Application.Endpoints.Patients.ResetPassword; - -public class PatientResetPasswordValidation : AbstractValidator -{ - private readonly IPatientRepository _patientRepository; - - public PatientResetPasswordValidation(IPatientRepository patientRepository) - { - _patientRepository = patientRepository; - - RuleFor(x => x.Email) - .NotEmpty().WithMessage("Email is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .EmailAddress().WithMessage("Invalid email format.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync(BeExistingPacient).WithMessage("Patient with this email does not exist.") - .WithErrorCode(HttpStatusCodes.NotFound.ToString()); - - RuleFor(x => x.Password) - .NotEmpty().WithMessage("Password is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync((dto, password, context, cancellationToken) => - BeDifferentFromOldPassword(dto.Email, password, cancellationToken)) - .WithMessage("New password cannot be the same as old password.") - .WithErrorCode(HttpStatusCodes.BadRequest.ToString()); - } - - private async Task BeExistingPacient(string email, CancellationToken cancellationToken) - { - var pacient = await _patientRepository.FindByEmailAsync(email); - return pacient != null; - } - - private async Task BeDifferentFromOldPassword(string email, string newPassword, - CancellationToken cancellationToken) - { - var currentPatient = await _patientRepository.FindByEmailAsync(email); - return !newPassword.Equals(currentPatient?.Password, StringComparison.Ordinal); - } -} \ No newline at end of file diff --git a/backend/Application/Services/Database/PostgreSQL/IDoctors.cs b/backend/Application/Services/Database/PostgreSQL/IDoctors.cs index 8de5550..57115f9 100644 --- a/backend/Application/Services/Database/PostgreSQL/IDoctors.cs +++ b/backend/Application/Services/Database/PostgreSQL/IDoctors.cs @@ -7,7 +7,6 @@ public interface IDoctorRepository Task AddAsync(Doctor doctor); Task GetByIdAsync(Guid id); - Task FindByEmailAsync(string email); Task CredentialsMatch(string email, string password); diff --git a/backend/Application/Services/Database/PostgreSQL/IPatients.cs b/backend/Application/Services/Database/PostgreSQL/IPatients.cs index f477726..aee15f1 100644 --- a/backend/Application/Services/Database/PostgreSQL/IPatients.cs +++ b/backend/Application/Services/Database/PostgreSQL/IPatients.cs @@ -7,8 +7,10 @@ public interface IPatientRepository Task AddAsync(Patient patient); Task GetByIdAsync(Guid id); - + Task FindByEmailAsync(string email); + + Task CredentialsMatch(string email, string password); Task UpdateAsync(Patient patient); diff --git a/backend/Application/Services/Email/IEmailService.cs b/backend/Application/Services/Email/IEmailService.cs index 570dddb..c39b857 100644 --- a/backend/Application/Services/Email/IEmailService.cs +++ b/backend/Application/Services/Email/IEmailService.cs @@ -4,4 +4,5 @@ public interface IEmailService { Task SendEmailAsync(string to, string subject, string body); string GenerateCredentialsEmailBody(string email, string password); + string GenerateResetCredentialsEmailBody(string email, string password); } diff --git a/backend/Application/bin/Debug/net8.0/Application.dll b/backend/Application/bin/Debug/net8.0/Application.dll index d5f2864..d9570ad 100644 Binary files a/backend/Application/bin/Debug/net8.0/Application.dll and b/backend/Application/bin/Debug/net8.0/Application.dll differ diff --git a/backend/Application/bin/Debug/net8.0/Application.pdb b/backend/Application/bin/Debug/net8.0/Application.pdb index 598c982..0de85f2 100644 Binary files a/backend/Application/bin/Debug/net8.0/Application.pdb and b/backend/Application/bin/Debug/net8.0/Application.pdb differ diff --git a/backend/Application/bin/Debug/net8.0/Core.dll b/backend/Application/bin/Debug/net8.0/Core.dll index 2d5ca28..7e1e95e 100644 Binary files a/backend/Application/bin/Debug/net8.0/Core.dll and b/backend/Application/bin/Debug/net8.0/Core.dll differ diff --git a/backend/Application/bin/Debug/net8.0/Core.pdb b/backend/Application/bin/Debug/net8.0/Core.pdb index 07208af..a45b614 100644 Binary files a/backend/Application/bin/Debug/net8.0/Core.pdb and b/backend/Application/bin/Debug/net8.0/Core.pdb differ diff --git a/backend/Application/obj/Application.csproj.nuget.dgspec.json b/backend/Application/obj/Application.csproj.nuget.dgspec.json index 19ba6c9..f65ba02 100644 --- a/backend/Application/obj/Application.csproj.nuget.dgspec.json +++ b/backend/Application/obj/Application.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": {} + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": {} }, "projects": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "projectName": "Application", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -26,8 +26,8 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj" } } } @@ -71,14 +71,14 @@ } } }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "projectName": "Core", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" diff --git a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs index 1a3520f..cc17bae 100644 --- a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs +++ b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Application")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d03c0ea4308c032d708d3ee63f648b10811c65f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Application")] [assembly: System.Reflection.AssemblyTitleAttribute("Application")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache index 4c8a9af..9696c5a 100644 --- a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache +++ b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache @@ -1 +1 @@ -5ebc7e7564dc4079f778b09cac511dae388a84af6e87589df0498d0a9bc6364f +2a4e5f5a0667b9cd53f41476d242e4588b36e9b8087ce5913d0c0c2c8bafbf9c diff --git a/backend/Application/obj/Debug/net8.0/Application.GeneratedMSBuildEditorConfig.editorconfig b/backend/Application/obj/Debug/net8.0/Application.GeneratedMSBuildEditorConfig.editorconfig index 8b01177..5405c06 100644 --- a/backend/Application/obj/Debug/net8.0/Application.GeneratedMSBuildEditorConfig.editorconfig +++ b/backend/Application/obj/Debug/net8.0/Application.GeneratedMSBuildEditorConfig.editorconfig @@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Application -build_property.ProjectDir = C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Application\ +build_property.ProjectDir = C:\Users\Andrei Cerbu\Desktop\backend\Application\ build_property.EnableComHosting = build_property.EnableGeneratedComInterfaceComImportInterop = diff --git a/backend/Application/obj/Debug/net8.0/Application.assets.cache b/backend/Application/obj/Debug/net8.0/Application.assets.cache index d31744b..9b3c7a0 100644 Binary files a/backend/Application/obj/Debug/net8.0/Application.assets.cache and b/backend/Application/obj/Debug/net8.0/Application.assets.cache differ diff --git a/backend/Application/obj/Debug/net8.0/Application.csproj.AssemblyReference.cache b/backend/Application/obj/Debug/net8.0/Application.csproj.AssemblyReference.cache index 0467b12..b85b20c 100644 Binary files a/backend/Application/obj/Debug/net8.0/Application.csproj.AssemblyReference.cache and b/backend/Application/obj/Debug/net8.0/Application.csproj.AssemblyReference.cache differ diff --git a/backend/Application/obj/Debug/net8.0/Applicat.44B5EDA2.Up2Date b/backend/Application/obj/Debug/net8.0/Application.csproj.CopyComplete similarity index 100% rename from backend/Application/obj/Debug/net8.0/Applicat.44B5EDA2.Up2Date rename to backend/Application/obj/Debug/net8.0/Application.csproj.CopyComplete diff --git a/backend/Application/obj/Debug/net8.0/Application.csproj.CoreCompileInputs.cache b/backend/Application/obj/Debug/net8.0/Application.csproj.CoreCompileInputs.cache index ff2c948..03ecf33 100644 --- a/backend/Application/obj/Debug/net8.0/Application.csproj.CoreCompileInputs.cache +++ b/backend/Application/obj/Debug/net8.0/Application.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -26e7a7899234aa69b1e72639220f61d98aa121dd4eb93d18c3595c34f36f0d99 +86e211b123fab4fbb22a62673497df80187fe50a64e6611ae90fb9b9bb002aa2 diff --git a/backend/Application/obj/Debug/net8.0/Application.csproj.FileListAbsolute.txt b/backend/Application/obj/Debug/net8.0/Application.csproj.FileListAbsolute.txt index d3501c5..de7c5bc 100644 --- a/backend/Application/obj/Debug/net8.0/Application.csproj.FileListAbsolute.txt +++ b/backend/Application/obj/Debug/net8.0/Application.csproj.FileListAbsolute.txt @@ -14,3 +14,33 @@ C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Application\obj\D C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Application\bin\Debug\net8.0\Core.dll C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Application\bin\Debug\net8.0\Core.pdb C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Application\obj\Debug\net8.0\Applicat.44B5EDA2.Up2Date +C:\Users\Andrei Cerbu\Desktop\backend\Application\bin\Debug\net8.0\Application.deps.json +C:\Users\Andrei Cerbu\Desktop\backend\Application\bin\Debug\net8.0\Application.dll +C:\Users\Andrei Cerbu\Desktop\backend\Application\bin\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Application\bin\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\backend\Application\bin\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\Application.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\Application.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\Application.AssemblyInfoInputs.cache +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\Application.AssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\Application.csproj.CoreCompileInputs.cache +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\Application.dll +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\refint\Application.dll +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\ref\Application.dll +C:\Users\Andrei Cerbu\Desktop\backend\Application\obj\Debug\net8.0\Application.csproj.CopyComplete +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\bin\Debug\net8.0\Application.deps.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\bin\Debug\net8.0\Application.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\bin\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\bin\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\bin\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\Application.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\Application.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\Application.AssemblyInfoInputs.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\Application.AssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\Application.csproj.CoreCompileInputs.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\Application.csproj.CopyComplete +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\Application.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\refint\Application.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Application\obj\Debug\net8.0\ref\Application.dll diff --git a/backend/Application/obj/Debug/net8.0/Application.dll b/backend/Application/obj/Debug/net8.0/Application.dll index d5f2864..d9570ad 100644 Binary files a/backend/Application/obj/Debug/net8.0/Application.dll and b/backend/Application/obj/Debug/net8.0/Application.dll differ diff --git a/backend/Application/obj/Debug/net8.0/Application.pdb b/backend/Application/obj/Debug/net8.0/Application.pdb index 598c982..0de85f2 100644 Binary files a/backend/Application/obj/Debug/net8.0/Application.pdb and b/backend/Application/obj/Debug/net8.0/Application.pdb differ diff --git a/backend/Application/obj/Debug/net8.0/Application.sourcelink.json b/backend/Application/obj/Debug/net8.0/Application.sourcelink.json deleted file mode 100644 index 6807585..0000000 --- a/backend/Application/obj/Debug/net8.0/Application.sourcelink.json +++ /dev/null @@ -1 +0,0 @@ -{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/0d03c0ea4308c032d708d3ee63f648b10811c65f/*"}} \ No newline at end of file diff --git a/backend/Application/obj/Debug/net8.0/ref/Application.dll b/backend/Application/obj/Debug/net8.0/ref/Application.dll index 82f13ad..8c7805f 100644 Binary files a/backend/Application/obj/Debug/net8.0/ref/Application.dll and b/backend/Application/obj/Debug/net8.0/ref/Application.dll differ diff --git a/backend/Application/obj/Debug/net8.0/refint/Application.dll b/backend/Application/obj/Debug/net8.0/refint/Application.dll index 82f13ad..8c7805f 100644 Binary files a/backend/Application/obj/Debug/net8.0/refint/Application.dll and b/backend/Application/obj/Debug/net8.0/refint/Application.dll differ diff --git a/backend/Application/obj/project.assets.json b/backend/Application/obj/project.assets.json index d5bdb35..54c13d2 100644 --- a/backend/Application/obj/project.assets.json +++ b/backend/Application/obj/project.assets.json @@ -844,11 +844,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "projectName": "Application", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -863,8 +863,8 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj" } } } diff --git a/backend/Application/obj/project.nuget.cache b/backend/Application/obj/project.nuget.cache index eb17fef..df1d0fe 100644 --- a/backend/Application/obj/project.nuget.cache +++ b/backend/Application/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "6rK5hZ4j6ClAzfxuWc17Wft98VDUQupYiEeI5viBfPq8M3e7wy2vBJ/LEy/lClFvezbz4wHPGdpeQDPOA9ZtBw==", + "dgSpecHash": "0ClHdlfbDgZ8zAZGcl1neMLoWmLFvZ+1Y5tTj0vJcUjNy9Ph18sNfG/KgnG0AvVyaxONeDD1RDur1o3sw58JJw==", "success": true, - "projectFilePath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectFilePath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "expectedPackageFiles": [ "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\awssdk.core\\3.7.100.14\\awssdk.core.3.7.100.14.nupkg.sha512", "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\awssdk.securitytoken\\3.7.100.14\\awssdk.securitytoken.3.7.100.14.nupkg.sha512", diff --git a/backend/Application/obj/project.packagespec.json b/backend/Application/obj/project.packagespec.json index 23daba5..3c874d2 100644 --- a/backend/Application/obj/project.packagespec.json +++ b/backend/Application/obj/project.packagespec.json @@ -1 +1 @@ -"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj","projectName":"Application","projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"FluentValidation":{"target":"Package","version":"[11.9.0, )"},"MongoDB.Driver":{"target":"Package","version":"[2.24.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file +"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj","projectName":"Application","projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"FluentValidation":{"target":"Package","version":"[11.9.0, )"},"MongoDB.Driver":{"target":"Package","version":"[2.24.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/backend/Application/obj/rider.project.model.nuget.info b/backend/Application/obj/rider.project.model.nuget.info index 588b395..881c5b4 100644 --- a/backend/Application/obj/rider.project.model.nuget.info +++ b/backend/Application/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17125685577729624 \ No newline at end of file +17127155176596989 \ No newline at end of file diff --git a/backend/Application/obj/rider.project.restore.info b/backend/Application/obj/rider.project.restore.info index 588b395..881c5b4 100644 --- a/backend/Application/obj/rider.project.restore.info +++ b/backend/Application/obj/rider.project.restore.info @@ -1 +1 @@ -17125685577729624 \ No newline at end of file +17127155176596989 \ No newline at end of file diff --git a/backend/Core/bin/Debug/net8.0/Core.dll b/backend/Core/bin/Debug/net8.0/Core.dll index 2d5ca28..7e1e95e 100644 Binary files a/backend/Core/bin/Debug/net8.0/Core.dll and b/backend/Core/bin/Debug/net8.0/Core.dll differ diff --git a/backend/Core/bin/Debug/net8.0/Core.pdb b/backend/Core/bin/Debug/net8.0/Core.pdb index 07208af..a45b614 100644 Binary files a/backend/Core/bin/Debug/net8.0/Core.pdb and b/backend/Core/bin/Debug/net8.0/Core.pdb differ diff --git a/backend/Core/obj/Core.csproj.nuget.dgspec.json b/backend/Core/obj/Core.csproj.nuget.dgspec.json index 55cdb2d..3e9d19a 100644 --- a/backend/Core/obj/Core.csproj.nuget.dgspec.json +++ b/backend/Core/obj/Core.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": {} + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": {} }, "projects": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "projectName": "Core", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" diff --git a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs index 1935a96..1bf6110 100644 --- a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs +++ b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Core")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d03c0ea4308c032d708d3ee63f648b10811c65f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Core")] [assembly: System.Reflection.AssemblyTitleAttribute("Core")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache index 9989e26..788bc6d 100644 --- a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache +++ b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache @@ -1 +1 @@ -5a6e74a12f0945636560f529431fe24f2f54ca0d381dda4f2ec4349776fcc2bd +6b75372ec2e1e7c58826b5bf52533c8862e7e84c43b04e954e756881b6eec37e diff --git a/backend/Core/obj/Debug/net8.0/Core.GeneratedMSBuildEditorConfig.editorconfig b/backend/Core/obj/Debug/net8.0/Core.GeneratedMSBuildEditorConfig.editorconfig index 2791433..a823266 100644 --- a/backend/Core/obj/Debug/net8.0/Core.GeneratedMSBuildEditorConfig.editorconfig +++ b/backend/Core/obj/Debug/net8.0/Core.GeneratedMSBuildEditorConfig.editorconfig @@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Core -build_property.ProjectDir = C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Core\ +build_property.ProjectDir = C:\Users\Andrei Cerbu\Desktop\backend\Core\ build_property.EnableComHosting = build_property.EnableGeneratedComInterfaceComImportInterop = diff --git a/backend/Core/obj/Debug/net8.0/Core.assets.cache b/backend/Core/obj/Debug/net8.0/Core.assets.cache index 8ebd8b6..26b0e2d 100644 Binary files a/backend/Core/obj/Debug/net8.0/Core.assets.cache and b/backend/Core/obj/Debug/net8.0/Core.assets.cache differ diff --git a/backend/Core/obj/Debug/net8.0/Core.csproj.FileListAbsolute.txt b/backend/Core/obj/Debug/net8.0/Core.csproj.FileListAbsolute.txt index 6f0a868..768c17d 100644 --- a/backend/Core/obj/Debug/net8.0/Core.csproj.FileListAbsolute.txt +++ b/backend/Core/obj/Debug/net8.0/Core.csproj.FileListAbsolute.txt @@ -11,3 +11,27 @@ C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Core\obj\Debug\ne C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Core\obj\Debug\net8.0\Core.pdb C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Core\obj\Debug\net8.0\ref\Core.dll C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Core\obj\Debug\net8.0\Core.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\backend\Core\bin\Debug\net8.0\Core.deps.json +C:\Users\Andrei Cerbu\Desktop\backend\Core\bin\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\backend\Core\bin\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\Core.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\Core.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\Core.AssemblyInfoInputs.cache +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\Core.AssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\Core.csproj.CoreCompileInputs.cache +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\refint\Core.dll +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Core\obj\Debug\net8.0\ref\Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\bin\Debug\net8.0\Core.deps.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\bin\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\bin\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\Core.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\Core.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\Core.AssemblyInfoInputs.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\Core.AssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\Core.csproj.CoreCompileInputs.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\refint\Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Core\obj\Debug\net8.0\ref\Core.dll diff --git a/backend/Core/obj/Debug/net8.0/Core.dll b/backend/Core/obj/Debug/net8.0/Core.dll index 2d5ca28..7e1e95e 100644 Binary files a/backend/Core/obj/Debug/net8.0/Core.dll and b/backend/Core/obj/Debug/net8.0/Core.dll differ diff --git a/backend/Core/obj/Debug/net8.0/Core.pdb b/backend/Core/obj/Debug/net8.0/Core.pdb index 07208af..a45b614 100644 Binary files a/backend/Core/obj/Debug/net8.0/Core.pdb and b/backend/Core/obj/Debug/net8.0/Core.pdb differ diff --git a/backend/Core/obj/Debug/net8.0/Core.sourcelink.json b/backend/Core/obj/Debug/net8.0/Core.sourcelink.json deleted file mode 100644 index 6807585..0000000 --- a/backend/Core/obj/Debug/net8.0/Core.sourcelink.json +++ /dev/null @@ -1 +0,0 @@ -{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/0d03c0ea4308c032d708d3ee63f648b10811c65f/*"}} \ No newline at end of file diff --git a/backend/Core/obj/Debug/net8.0/ref/Core.dll b/backend/Core/obj/Debug/net8.0/ref/Core.dll index 3153183..9688dba 100644 Binary files a/backend/Core/obj/Debug/net8.0/ref/Core.dll and b/backend/Core/obj/Debug/net8.0/ref/Core.dll differ diff --git a/backend/Core/obj/Debug/net8.0/refint/Core.dll b/backend/Core/obj/Debug/net8.0/refint/Core.dll index 3153183..9688dba 100644 Binary files a/backend/Core/obj/Debug/net8.0/refint/Core.dll and b/backend/Core/obj/Debug/net8.0/refint/Core.dll differ diff --git a/backend/Core/obj/project.assets.json b/backend/Core/obj/project.assets.json index 9aa5c4a..012f572 100644 --- a/backend/Core/obj/project.assets.json +++ b/backend/Core/obj/project.assets.json @@ -130,11 +130,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "projectName": "Core", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" diff --git a/backend/Core/obj/project.nuget.cache b/backend/Core/obj/project.nuget.cache index 3810bab..afb0c0e 100644 --- a/backend/Core/obj/project.nuget.cache +++ b/backend/Core/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "nUJYWQem8SFagSjBlwYcU+nbTi53nWZSxYTrPiHNTHcOWnBld4SMEechWWzFO+t4nThl0DYYE7H20aSoUlJA8A==", + "dgSpecHash": "+EiYqT3rYdVWvwXiZsHNFaB2D6uO2Xeh+V7LlHiNaWxmQ4mUUvwdIQ1hl8B+mPVwG35Z+1d3VfMpI88Xi5O3CQ==", "success": true, - "projectFilePath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectFilePath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "expectedPackageFiles": [ "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\mongodb.bson\\2.24.0\\mongodb.bson.2.24.0.nupkg.sha512", "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\system.memory\\4.5.5\\system.memory.4.5.5.nupkg.sha512", diff --git a/backend/Core/obj/project.packagespec.json b/backend/Core/obj/project.packagespec.json index e493125..3ee811d 100644 --- a/backend/Core/obj/project.packagespec.json +++ b/backend/Core/obj/project.packagespec.json @@ -1 +1 @@ -"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj","projectName":"Core","projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"MongoDB.Bson":{"target":"Package","version":"[2.24.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file +"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj","projectName":"Core","projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"MongoDB.Bson":{"target":"Package","version":"[2.24.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/backend/Core/obj/rider.project.model.nuget.info b/backend/Core/obj/rider.project.model.nuget.info index 5cd0972..94e110d 100644 --- a/backend/Core/obj/rider.project.model.nuget.info +++ b/backend/Core/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17125685577652628 \ No newline at end of file +17127155176611080 \ No newline at end of file diff --git a/backend/Core/obj/rider.project.restore.info b/backend/Core/obj/rider.project.restore.info index 5cd0972..94e110d 100644 --- a/backend/Core/obj/rider.project.restore.info +++ b/backend/Core/obj/rider.project.restore.info @@ -1 +1 @@ -17125685577652628 \ No newline at end of file +17127155176611080 \ No newline at end of file diff --git a/backend/HealthcareManagerAPI.sln.DotSettings.user b/backend/HealthcareManagerAPI.sln.DotSettings.user index 622dbc0..efb65a1 100644 --- a/backend/HealthcareManagerAPI.sln.DotSettings.user +++ b/backend/HealthcareManagerAPI.sln.DotSettings.user @@ -1,3 +1,4 @@  - C:\Users\Andrei Cerbu\.dotnet\sdk\8.0.203\MSBuild.dll \ No newline at end of file + C:\Program Files\JetBrains\JetBrains Rider 2023.3.4\tools\MSBuild\Current\Bin\MSBuild.exe + 1114112 \ No newline at end of file diff --git a/backend/Infrastructure/Services/Email/EmailService.cs b/backend/Infrastructure/Services/Email/EmailService.cs index 6417f5a..d2d5ac2 100644 --- a/backend/Infrastructure/Services/Email/EmailService.cs +++ b/backend/Infrastructure/Services/Email/EmailService.cs @@ -18,14 +18,11 @@ public class EmailService : IEmailService public async Task SendEmailAsync(string to, string subject, string body) { - Console.WriteLine(_smtpSettings.Host); - Console.WriteLine(_smtpSettings.Port); - using (var client = new SmtpClient(_smtpSettings.Host, _smtpSettings.Port)) { client.EnableSsl = _smtpSettings.EnableSSL; client.Credentials = new NetworkCredential(_smtpSettings.UserName, _smtpSettings.Password); - + var mailMessage = new MailMessage { From = new MailAddress(_smtpSettings.From), @@ -38,21 +35,35 @@ public class EmailService : IEmailService await client.SendMailAsync(mailMessage); } } - + public string GenerateCredentialsEmailBody(string email, string password) { - string template = @" + var template = @"

Welcome to HealthcareManager

You can now log in using the following credentials:

Email: {email}

Password: {password}

-

For security reasons, please change your password after logging in.

+

Thank you for choosing our services and we wish you an amazing day!

"; return template.Replace("{email}", email).Replace("{password}", password); } -} + public string GenerateResetCredentialsEmailBody(string email, string password) + { + var template = @" + + +

Password Reset Successful

+

Your password has been successfully reset. You can now log in to your HealthcareManager account using your new password.

+

If you did not request a password reset, please contact our support team immediately.

+

For security reasons, it's recommended to keep your password confidential and to change it regularly.

+ + "; + + return template.Replace("{email}", email).Replace("{password}", password); + } +} \ No newline at end of file diff --git a/backend/Infrastructure/Services/PostgreSQL/DoctorRepository.cs b/backend/Infrastructure/Services/PostgreSQL/DoctorRepository.cs index 4228259..4d2d35e 100644 --- a/backend/Infrastructure/Services/PostgreSQL/DoctorRepository.cs +++ b/backend/Infrastructure/Services/PostgreSQL/DoctorRepository.cs @@ -15,6 +15,6 @@ public class DoctorRepository(HealthcareManagerDatabase context) public async Task CredentialsMatch(string email, string password) { - return _context.Doctors.Any(u => u.Email == email && u.Password == password); + return await _context.Doctors.AnyAsync(u => u.Email == email && u.Password == password); } } \ No newline at end of file diff --git a/backend/Infrastructure/Services/PostgreSQL/PatientRepository.cs b/backend/Infrastructure/Services/PostgreSQL/PatientRepository.cs index 97588c1..5723340 100644 --- a/backend/Infrastructure/Services/PostgreSQL/PatientRepository.cs +++ b/backend/Infrastructure/Services/PostgreSQL/PatientRepository.cs @@ -12,4 +12,9 @@ public class PatientRepository(HealthcareManagerDatabase context) { return await _context.Patients.FirstOrDefaultAsync(d => d.Email == email); } + + public async Task CredentialsMatch(string email, string password) + { + return await _context.Patients.AnyAsync(u => u.Email == email && u.Password == password); + } } \ No newline at end of file diff --git a/backend/Infrastructure/bin/Debug/net8.0/Application.dll b/backend/Infrastructure/bin/Debug/net8.0/Application.dll index d5f2864..d9570ad 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Application.dll and b/backend/Infrastructure/bin/Debug/net8.0/Application.dll differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Application.pdb b/backend/Infrastructure/bin/Debug/net8.0/Application.pdb index 598c982..0de85f2 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Application.pdb and b/backend/Infrastructure/bin/Debug/net8.0/Application.pdb differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Core.dll b/backend/Infrastructure/bin/Debug/net8.0/Core.dll index 2d5ca28..7e1e95e 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Core.dll and b/backend/Infrastructure/bin/Debug/net8.0/Core.dll differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Core.pdb b/backend/Infrastructure/bin/Debug/net8.0/Core.pdb index 07208af..a45b614 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Core.pdb and b/backend/Infrastructure/bin/Debug/net8.0/Core.pdb differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.dll b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.dll index 415c18b..2e699c0 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.dll and b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.dll differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.pdb b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.pdb index 394efdf..c5f907f 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.pdb and b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.pdb differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs index e229f48..b6c8d51 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0d03c0ea4308c032d708d3ee63f648b10811c65f")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] [assembly: System.Reflection.AssemblyProductAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyTitleAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache index 9275678..a506843 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache @@ -1 +1 @@ -216a0769924e0848d0c09eb46e477765dd2a8d7e28503106a43024c1a9d666a1 +37fc0f6880944d249644ad7a3819987a76f6dbbfab3d452f8e52bde10eed69b0 diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.GeneratedMSBuildEditorConfig.editorconfig b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.GeneratedMSBuildEditorConfig.editorconfig index 3cf157a..cb9bbf6 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.GeneratedMSBuildEditorConfig.editorconfig +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.GeneratedMSBuildEditorConfig.editorconfig @@ -8,6 +8,6 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Infrastructure -build_property.ProjectDir = C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Infrastructure\ +build_property.ProjectDir = C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\ build_property.EnableComHosting = build_property.EnableGeneratedComInterfaceComImportInterop = diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.assets.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.assets.cache index 2e26b59..2bb91db 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.assets.cache and b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.assets.cache differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.AssemblyReference.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.AssemblyReference.cache index 5f95476..7ebc103 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.AssemblyReference.cache and b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.AssemblyReference.cache differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastr.15EFFBFE.Up2Date b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CopyComplete similarity index 100% rename from backend/Infrastructure/obj/Debug/net8.0/Infrastr.15EFFBFE.Up2Date rename to backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CopyComplete diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CoreCompileInputs.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CoreCompileInputs.cache index 2c0b44e..2b85b58 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CoreCompileInputs.cache +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -36246167bc67f799ef7d06b38addbdbc2934572b797d99ee0e80ef15f6df67cd +23568e1f5cf7ff864d9d72d90d52471e5cf497ba00487d719b4bb26871b8c4c0 diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.FileListAbsolute.txt b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.FileListAbsolute.txt index e3a92fb..55fe08b 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.FileListAbsolute.txt +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.FileListAbsolute.txt @@ -18,3 +18,41 @@ C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Infrastructure\ob C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Infrastructure\obj\Debug\net8.0\ref\Infrastructure.dll C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Infrastructure\bin\Debug\net8.0\Application.dll C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\Infrastructure\bin\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\bin\Debug\net8.0\Infrastructure.deps.json +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\bin\Debug\net8.0\Infrastructure.runtimeconfig.json +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\bin\Debug\net8.0\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\bin\Debug\net8.0\Infrastructure.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\bin\Debug\net8.0\Application.dll +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\bin\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\bin\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\bin\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.AssemblyInfoInputs.cache +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.AssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.csproj.CoreCompileInputs.cache +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\refint\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.pdb +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.genruntimeconfig.cache +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\ref\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.csproj.CopyComplete +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\bin\Debug\net8.0\Infrastructure.deps.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\bin\Debug\net8.0\Infrastructure.runtimeconfig.json +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\bin\Debug\net8.0\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\bin\Debug\net8.0\Infrastructure.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\bin\Debug\net8.0\Application.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\bin\Debug\net8.0\Core.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\bin\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\bin\Debug\net8.0\Core.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.csproj.AssemblyReference.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.GeneratedMSBuildEditorConfig.editorconfig +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.AssemblyInfoInputs.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.AssemblyInfo.cs +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.csproj.CoreCompileInputs.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.csproj.CopyComplete +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\refint\Infrastructure.dll +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.pdb +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\Infrastructure.genruntimeconfig.cache +C:\Users\Andrei Cerbu\Desktop\sesiunile main\backend\Infrastructure\obj\Debug\net8.0\ref\Infrastructure.dll diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.dll b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.dll index 415c18b..2e699c0 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.dll and b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.dll differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.genruntimeconfig.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.genruntimeconfig.cache index a419895..8c8e8ed 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.genruntimeconfig.cache +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.genruntimeconfig.cache @@ -1 +1 @@ -8669647c4f952cb9f9825a534fa4bb1335040a9cec57b5e81118a81800eca4aa +fbc8ec4d14aaed697f39357c851a2a038744b193f654a11d67a6cb1bad5c36c2 diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.pdb b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.pdb index 394efdf..c5f907f 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.pdb and b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.pdb differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.sourcelink.json b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.sourcelink.json deleted file mode 100644 index 6807585..0000000 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.sourcelink.json +++ /dev/null @@ -1 +0,0 @@ -{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/0d03c0ea4308c032d708d3ee63f648b10811c65f/*"}} \ No newline at end of file diff --git a/backend/Infrastructure/obj/Debug/net8.0/ref/Infrastructure.dll b/backend/Infrastructure/obj/Debug/net8.0/ref/Infrastructure.dll index e9e09db..0dd5df7 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/ref/Infrastructure.dll and b/backend/Infrastructure/obj/Debug/net8.0/ref/Infrastructure.dll differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/refint/Infrastructure.dll b/backend/Infrastructure/obj/Debug/net8.0/refint/Infrastructure.dll index e9e09db..0dd5df7 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/refint/Infrastructure.dll and b/backend/Infrastructure/obj/Debug/net8.0/refint/Infrastructure.dll differ diff --git a/backend/Infrastructure/obj/Infrastructure.csproj.nuget.dgspec.json b/backend/Infrastructure/obj/Infrastructure.csproj.nuget.dgspec.json index 9b29fd6..a162e35 100644 --- a/backend/Infrastructure/obj/Infrastructure.csproj.nuget.dgspec.json +++ b/backend/Infrastructure/obj/Infrastructure.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj": {} + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj": {} }, "projects": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "projectName": "Application", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -26,8 +26,8 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj" } } } @@ -71,14 +71,14 @@ } } }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "projectName": "Core", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -130,14 +130,14 @@ } } }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj": { + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj", "projectName": "Infrastructure", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -152,11 +152,11 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj" }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj" } } } diff --git a/backend/Infrastructure/obj/project.assets.json b/backend/Infrastructure/obj/project.assets.json index c6b363b..c7b52e1 100644 --- a/backend/Infrastructure/obj/project.assets.json +++ b/backend/Infrastructure/obj/project.assets.json @@ -3659,11 +3659,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj", + "projectUniqueName": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj", "projectName": "Infrastructure", - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj", + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj", "packagesPath": "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\", - "outputPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\obj\\", + "outputPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\obj\\", "projectStyle": "PackageReference", "configFilePaths": [ "C:\\Users\\Andrei Cerbu\\AppData\\Roaming\\NuGet\\NuGet.Config" @@ -3678,11 +3678,11 @@ "net8.0": { "targetAlias": "net8.0", "projectReferences": { - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj" }, - "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj": { - "projectPath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj" + "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj": { + "projectPath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj" } } } diff --git a/backend/Infrastructure/obj/project.nuget.cache b/backend/Infrastructure/obj/project.nuget.cache index bc245e8..8dcf462 100644 --- a/backend/Infrastructure/obj/project.nuget.cache +++ b/backend/Infrastructure/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "pF3XqxVA87LZ2eqKgkY0WSdNfMkjY7iYYiKVDDpMtBbgzsStmL5AV+YB1rj394lXBXpedmSvoVfqxSY86Dd62g==", + "dgSpecHash": "5cT5WRkYtmxXk3fpr5xOVxGGlXF2nVdOjptC6Tc7YDgcQih758y26gBX3QhHasX7HLIcIYcW6ijz5KgoEm8uKQ==", "success": true, - "projectFilePath": "C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj", + "projectFilePath": "C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj", "expectedPackageFiles": [ "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\awssdk.core\\3.7.100.14\\awssdk.core.3.7.100.14.nupkg.sha512", "C:\\Users\\Andrei Cerbu\\.nuget\\packages\\awssdk.securitytoken\\3.7.100.14\\awssdk.securitytoken.3.7.100.14.nupkg.sha512", diff --git a/backend/Infrastructure/obj/project.packagespec.json b/backend/Infrastructure/obj/project.packagespec.json index 2184a76..4b7979e 100644 --- a/backend/Infrastructure/obj/project.packagespec.json +++ b/backend/Infrastructure/obj/project.packagespec.json @@ -1 +1 @@ -"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj","projectName":"Infrastructure","projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\Infrastructure.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Infrastructure\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Application\\Application.csproj"},"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\backend\\Core\\Core.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Microsoft.EntityFrameworkCore":{"target":"Package","version":"[8.0.3, )"},"Microsoft.EntityFrameworkCore.Design":{"include":"Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive","suppressParent":"All","target":"Package","version":"[8.0.3, )"},"Microsoft.EntityFrameworkCore.Relational":{"target":"Package","version":"[8.0.3, )"},"Microsoft.Extensions.Configuration":{"target":"Package","version":"[8.0.0, )"},"Microsoft.Extensions.Configuration.Json":{"target":"Package","version":"[8.0.0, )"},"Microsoft.Extensions.Options.ConfigurationExtensions":{"target":"Package","version":"[8.0.0, )"},"Microsoft.IdentityModel.Tokens":{"target":"Package","version":"[7.5.1, )"},"MongoDB.Driver":{"target":"Package","version":"[2.24.0, )"},"Npgsql.EntityFrameworkCore.PostgreSQL":{"target":"Package","version":"[8.0.2, )"},"System.IdentityModel.Tokens.Jwt":{"target":"Package","version":"[7.5.1, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file +"restore":{"projectUniqueName":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj","projectName":"Infrastructure","projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\Infrastructure.csproj","outputPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Infrastructure\\obj\\","projectStyle":"PackageReference","originalTargetFrameworks":["net8.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Application\\Application.csproj"},"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj":{"projectPath":"C:\\Users\\Andrei Cerbu\\Desktop\\backend\\Core\\Core.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Microsoft.EntityFrameworkCore":{"target":"Package","version":"[8.0.3, )"},"Microsoft.EntityFrameworkCore.Design":{"include":"Runtime, Build, Native, ContentFiles, Analyzers, BuildTransitive","suppressParent":"All","target":"Package","version":"[8.0.3, )"},"Microsoft.EntityFrameworkCore.Relational":{"target":"Package","version":"[8.0.3, )"},"Microsoft.Extensions.Configuration":{"target":"Package","version":"[8.0.0, )"},"Microsoft.Extensions.Configuration.Json":{"target":"Package","version":"[8.0.0, )"},"Microsoft.Extensions.Options.ConfigurationExtensions":{"target":"Package","version":"[8.0.0, )"},"Microsoft.IdentityModel.Tokens":{"target":"Package","version":"[7.5.1, )"},"MongoDB.Driver":{"target":"Package","version":"[2.24.0, )"},"Npgsql.EntityFrameworkCore.PostgreSQL":{"target":"Package","version":"[8.0.2, )"},"System.IdentityModel.Tokens.Jwt":{"target":"Package","version":"[7.5.1, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Users\\Andrei Cerbu\\.dotnet\\sdk\\8.0.203/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/backend/Infrastructure/obj/rider.project.model.nuget.info b/backend/Infrastructure/obj/rider.project.model.nuget.info index d20ddb9..94e110d 100644 --- a/backend/Infrastructure/obj/rider.project.model.nuget.info +++ b/backend/Infrastructure/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17125685577988485 \ No newline at end of file +17127155176611080 \ No newline at end of file diff --git a/backend/Infrastructure/obj/rider.project.restore.info b/backend/Infrastructure/obj/rider.project.restore.info index d20ddb9..94e110d 100644 --- a/backend/Infrastructure/obj/rider.project.restore.info +++ b/backend/Infrastructure/obj/rider.project.restore.info @@ -1 +1 @@ -17125685577988485 \ No newline at end of file +17127155176611080 \ No newline at end of file diff --git a/backend/obj/--API.EntityFrameworkCore.targets b/backend/obj/--API.EntityFrameworkCore.targets deleted file mode 100644 index 7d6485d..0000000 --- a/backend/obj/--API.EntityFrameworkCore.targets +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/backend/obj/[YourEFCoreProjectPath].EntityFrameworkCore.targets b/backend/obj/[YourEFCoreProjectPath].EntityFrameworkCore.targets deleted file mode 100644 index 7d6485d..0000000 --- a/backend/obj/[YourEFCoreProjectPath].EntityFrameworkCore.targets +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/frontend/.idea/.idea.HealthcareManagerUI/.idea/.name b/frontend/.idea/.idea.HealthcareManagerUI/.idea/.name deleted file mode 100644 index 6c9ffb2..0000000 --- a/frontend/.idea/.idea.HealthcareManagerUI/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -HealthcareManagerUI \ No newline at end of file diff --git a/frontend/.idea/.idea.HealthcareManagerUI/.idea/vcs.xml b/frontend/.idea/.idea.HealthcareManagerUI/.idea/vcs.xml deleted file mode 100644 index 64713b8..0000000 --- a/frontend/.idea/.idea.HealthcareManagerUI/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/frontend/.idea/.idea.HealthcareManagerUI/.idea/.gitignore b/frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/.gitignore similarity index 86% rename from frontend/.idea/.idea.HealthcareManagerUI/.idea/.gitignore rename to frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/.gitignore index b68b1d2..6df33e0 100644 --- a/frontend/.idea/.idea.HealthcareManagerUI/.idea/.gitignore +++ b/frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/.gitignore @@ -2,10 +2,10 @@ /shelf/ /workspace.xml # Rider ignored files -/projectSettingsUpdater.xml +/.idea.HealthcareManagerUiWebAssem.iml /modules.xml +/projectSettingsUpdater.xml /contentModel.xml -/.idea.HealthcareManagerUI.iml # Editor-based HTTP Client requests /httpRequests/ # Datasource local storage ignored files diff --git a/frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/.name b/frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/.name new file mode 100644 index 0000000..20773e1 --- /dev/null +++ b/frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/.name @@ -0,0 +1 @@ +HealthcareManagerUiWebAssem \ No newline at end of file diff --git a/frontend/.idea/.idea.HealthcareManagerUI/.idea/encodings.xml b/frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/encodings.xml similarity index 100% rename from frontend/.idea/.idea.HealthcareManagerUI/.idea/encodings.xml rename to frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/encodings.xml diff --git a/frontend/.idea/.idea.HealthcareManagerUI/.idea/indexLayout.xml b/frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/indexLayout.xml similarity index 100% rename from frontend/.idea/.idea.HealthcareManagerUI/.idea/indexLayout.xml rename to frontend/.idea/.idea.HealthcareManagerUiWebAssem/.idea/indexLayout.xml diff --git a/frontend/App.razor b/frontend/App.razor new file mode 100644 index 0000000..d8d17c6 --- /dev/null +++ b/frontend/App.razor @@ -0,0 +1,12 @@ + + + + + + + Not found + +

Sorry, there's nothing at this address.

+
+
+
diff --git a/frontend/ApplicationConfigurationSettings.cs b/frontend/ApplicationConfigurationSettings.cs new file mode 100644 index 0000000..a0d16dc --- /dev/null +++ b/frontend/ApplicationConfigurationSettings.cs @@ -0,0 +1,7 @@ +namespace HealthcareManagerUiWebAssem; + +public class ApplicationSettings +{ + public string ApiKey { get; set; } + public string ApiEndpoint { get; set; } +} \ No newline at end of file diff --git a/frontend/HealthcareManagerUI/Components/Layout/AuthLayout.razor b/frontend/Components/Layout/AuthLayout.razor similarity index 100% rename from frontend/HealthcareManagerUI/Components/Layout/AuthLayout.razor rename to frontend/Components/Layout/AuthLayout.razor diff --git a/frontend/HealthcareManagerUI/Components/Pages/AlertMessage.razor b/frontend/Components/Pages/AlertMessage.razor similarity index 82% rename from frontend/HealthcareManagerUI/Components/Pages/AlertMessage.razor rename to frontend/Components/Pages/AlertMessage.razor index 32bdaeb..2d196a3 100644 --- a/frontend/HealthcareManagerUI/Components/Pages/AlertMessage.razor +++ b/frontend/Components/Pages/AlertMessage.razor @@ -7,6 +7,5 @@ } @code { - [Parameter] - public string ErrorMessage { get; set; } -} + [Parameter] public string ErrorMessage { get; set; } +} \ No newline at end of file diff --git a/frontend/HealthcareManagerUI/Components/Pages/ChooseRolePage.razor b/frontend/Components/Pages/ChooseRolePage.razor similarity index 92% rename from frontend/HealthcareManagerUI/Components/Pages/ChooseRolePage.razor rename to frontend/Components/Pages/ChooseRolePage.razor index 7a1af3f..b43a1d1 100644 --- a/frontend/HealthcareManagerUI/Components/Pages/ChooseRolePage.razor +++ b/frontend/Components/Pages/ChooseRolePage.razor @@ -1,5 +1,5 @@ @page "/" -@using HealthcareManagerUI.Components.Layout + @layout AuthLayout Choose Role diff --git a/frontend/Components/Pages/DashboardPage.razor b/frontend/Components/Pages/DashboardPage.razor new file mode 100644 index 0000000..b399872 --- /dev/null +++ b/frontend/Components/Pages/DashboardPage.razor @@ -0,0 +1,28 @@ +@page "/dashboard/{Role}" +@using HealthcareManagerUiWebAssem.Services.User + +@layout AuthLayout +@inject UserService UserService + + + Dashboard + + +

login success

+

@displayMessage

+
+ My Profile +
+ +@code { + + [Parameter] public string Role { get; set; } + private string displayMessage; + + protected override void OnInitialized() + { + var userId = UserService.UserId; + displayMessage = $"Login success for {Role} with ID: {userId}"; + } + +} \ No newline at end of file diff --git a/frontend/Components/Pages/LoginPage.razor b/frontend/Components/Pages/LoginPage.razor new file mode 100644 index 0000000..24cb347 --- /dev/null +++ b/frontend/Components/Pages/LoginPage.razor @@ -0,0 +1,113 @@ +@page "/login/{role}" +@using System.Text.Json +@using HealthcareManagerUiWebAssem.Models +@using HealthcareManagerUiWebAssem.Services.Authentication +@using HealthcareManagerUiWebAssem.Services.User +@using HealthcareManagerUiWebAssem.Services.UserSessionInformation + +@layout AuthLayout + +@inject IAuthenticationService AuthenticationService +@inject IUserSessionInformation UserSessionInformation; +@inject NavigationManager NavigationManager +@inject UserService UserService + + + + Login + + + + + + + + + +@code { + [SupplyParameterFromForm] public UserLoginModel? userLoginModel { get; set; } + private BaseResponse? loginResponse; + + protected override void OnInitialized() + { + userLoginModel ??= new UserLoginModel(); + } + + [Parameter] + public string Role { get; set; } + private string errorMessage { get; set; } + private bool loginSuccesful { get; set; } + + private void ClearErrorMessage() + { + errorMessage = string.Empty; + } + + private async Task HandleLogin() + { + userLoginModel.UserType = Role; + loginResponse = await AuthenticationService.Login(userLoginModel); // Store response instead of immediately processing + if (loginResponse.StatusCode < 200 || loginResponse.StatusCode > 299) + { + errorMessage = loginResponse?.Message ?? "An error occurred."; // Handle error states immediately if required + } + + else + { + var userId = Guid.Empty; + var authToken = ""; + Console.WriteLine("Printing headers"); + foreach (var (key, value) in loginResponse.Headers) + { + Console.WriteLine($"{key} => {value}"); + } + + if (loginResponse.Headers.TryGetValue("Authorization", out var token)) + { + authToken = token; + } + + if (Role.Equals("doctor", StringComparison.OrdinalIgnoreCase)) + { + var doctor = JsonSerializer.Deserialize( + loginResponse.Data, + new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); + await UserSessionInformation.SaveUserInformationAsync(doctor.Id, Role, doctor.Email, doctor.Name, authToken); + userId = doctor.Id; + } + else if (Role.Equals("patient", StringComparison.OrdinalIgnoreCase)) + { + var patient = JsonSerializer.Deserialize( + loginResponse.Data, + new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); + await UserSessionInformation.SaveUserInformationAsync(patient.Id, Role, patient.Email, patient.Name, authToken); + userId = patient.Id; + } + + loginResponse = null; + + UserService.SetUserId(userId); + NavigationManager.NavigateTo($"/dashboard/{Role}"); + } + } +} \ No newline at end of file diff --git a/frontend/Components/Pages/MyProfilePage.razor b/frontend/Components/Pages/MyProfilePage.razor new file mode 100644 index 0000000..dac7d59 --- /dev/null +++ b/frontend/Components/Pages/MyProfilePage.razor @@ -0,0 +1,123 @@ +@page "/my-profile/{Role}" +@using HealthcareManagerUiWebAssem.Models +@using HealthcareManagerUiWebAssem.Services.Authentication +@using HealthcareManagerUiWebAssem.Services.Profile +@using HealthcareManagerUiWebAssem.Services.User +@using HealthcareManagerUiWebAssem.Services.UserSessionInformation + +@layout AuthLayout +@inject IUserSessionInformation UserSessionInformation; +@inject IAuthenticationService AuthenticationService; +@inject IProfileService ProfileService +@inject UserService UserService +@inject NavigationManager NavigationManager + + + My Profile + + + + + +

My Profile

+@if (profile != null) +{ + + + + +} + +@code { + + [SupplyParameterFromForm] public UserUpdateProfileModel? profile { get; set; } + + [Parameter] public string Role { get; set; } + private string errorMessage; + + protected override async Task OnInitializedAsync() + { + var tokenDto = new TokenRefreshModel(await UserSessionInformation.GetTokenAsync()); + var refreshResult = await AuthenticationService.RefreshToken(tokenDto); + if (refreshResult.StatusCode < HttpStatusCodes.BadRequest) + { + NavigationManager.NavigateTo("/"); + } + + profile ??= await UserService.InitializeProfile(Role, ProfileService); + var userId = await UserSessionInformation.GetIdAsync(); + } + + private async Task HandleUpdateProfile() + { + profile.Id = UserService.UserId; + var response = Role switch + { + "doctor" => await ProfileService.UpdateDoctorProfile(profile), + "patient" => await ProfileService.UpdatePatientProfile(profile), + _ => null + }; + + if (response.StatusCode >= 200 && response.StatusCode <= 299) + { + NavigationManager.NavigateTo($"/my-profile/{Role}"); + } + else + { + errorMessage = response?.Message ?? "An error occurred."; + } + } + + private async Task HandleDeleteProfile() + { + var response = Role switch + { + "doctor" => await ProfileService.DeleteDoctorProfile(UserService.UserId), + "patient" => await ProfileService.DeletePatientProfile(UserService.UserId), + _ => null + }; + + if (response.StatusCode >= 200 && response.StatusCode <= 299) + { + NavigationManager.NavigateTo($"/login/{Role}"); + } + else + { + errorMessage = response?.Message ?? "An error occurred."; + } + } + +} \ No newline at end of file diff --git a/frontend/HealthcareManagerUI/Components/Pages/RegisterPage.razor b/frontend/Components/Pages/RegisterPage.razor similarity index 83% rename from frontend/HealthcareManagerUI/Components/Pages/RegisterPage.razor rename to frontend/Components/Pages/RegisterPage.razor index 526a43f..68b1b52 100644 --- a/frontend/HealthcareManagerUI/Components/Pages/RegisterPage.razor +++ b/frontend/Components/Pages/RegisterPage.razor @@ -1,7 +1,6 @@ @page "/register/{role}" -@using HealthcareManagerUI.Models -@using HealthcareManagerUI.Services.Authentication -@using HealthcareManagerUI.Components.Layout +@using HealthcareManagerUiWebAssem.Models +@using HealthcareManagerUiWebAssem.Services.Authentication @layout AuthLayout @@ -12,12 +11,12 @@ Register - - + +