diff --git a/docs/web/diagrams/vertical-slice.md b/docs/web/diagrams/vertical-slice.md index 5d7467c3..44c7a1c1 100644 --- a/docs/web/diagrams/vertical-slice.md +++ b/docs/web/diagrams/vertical-slice.md @@ -45,8 +45,6 @@ see the notes for what else each of those foundation projects pulls in. commands/queries + handlers, validators, and Dapper repository - `Features.Users` covers auth (`Commands/Authentication`), account management (`Commands/Account`), and profile/avatar (`Commands/Profile`) - - internally namespaced `Features.Auth`, despite project name - `Features.Users` - `Features.Emails` and `Features.PhotoUpload` have no controller — invoked only via MediatR commands sent from other slices - `Features.Locations` has no controller; one MediatR handler @@ -65,7 +63,7 @@ see the notes for what else each of those foundation projects pulls in. `RegisterUserHandler`) and `ConfirmationEmailResendRequestedNotification` (published from `ResendConfirmationEmailHandler`) - both notification types live in `Features.Users` - (`Features.Auth.Notifications`), not in `Shared.Application` + (`Features.Users.Notifications`), not in `Shared.Application` - **Shared.Application**: - `ValidationBehavior` (MediatR pipeline) diff --git a/web/backend/API/API.Core/ServiceCollectionExtensions.cs b/web/backend/API/API.Core/ServiceCollectionExtensions.cs index 10093479..d3621cf0 100644 --- a/web/backend/API/API.Core/ServiceCollectionExtensions.cs +++ b/web/backend/API/API.Core/ServiceCollectionExtensions.cs @@ -1,6 +1,5 @@ using API.Core.Authentication; using Database.Connection.DependencyInjection; -using Features.Auth.Controllers; using Features.Breweries.Controllers; using Features.Breweries.DependencyInjection; using Features.Emails.DependencyInjection; @@ -9,6 +8,7 @@ using Features.ImageUploads.Commands.UploadPhoto; using Features.ImageUploads.DependencyInjection; using Features.Locations.Controllers; using Features.Locations.DependencyInjection; +using Features.Users.Controllers; using Features.Users.DependencyInjection; using FluentValidation; using FluentValidation.AspNetCore; diff --git a/web/backend/Database/Database.Seed/BiergartenDataSeeder.cs b/web/backend/Database/Database.Seed/BiergartenDataSeeder.cs index 87028732..6c5a2d60 100644 --- a/web/backend/Database/Database.Seed/BiergartenDataSeeder.cs +++ b/web/backend/Database/Database.Seed/BiergartenDataSeeder.cs @@ -2,10 +2,6 @@ using Database.Seed.DatabaseHelpers; using Database.Seed.Sqlite; using Database.Seed.SourceDataModels; using Domain.Entities; -using Features.Auth.Commands.Authentication.RegisterUser; -using Features.Auth.Commands.Profile.UpdateBiography; -using Features.Auth.Commands.Profile.UploadAvatar; -using Features.Auth.Dtos; using Features.Breweries.Commands.CreateBrewery; using Features.Locations.Commands.CreateCity; using Features.Locations.Commands.CreateCountry; @@ -13,6 +9,10 @@ using Features.Locations.Commands.CreateStateProvince; using Features.Locations.Queries.GetCity; using Features.Locations.Queries.GetCountry; using Features.Locations.Queries.GetStateProvince; +using Features.Users.Commands.Authentication.RegisterUser; +using Features.Users.Commands.Profile.UpdateBiography; +using Features.Users.Commands.Profile.UploadAvatar; +using Features.Users.Dtos; using idunno.Password; using MediatR; using Microsoft.AspNetCore.Http; diff --git a/web/backend/Database/Database.Seed/DatabaseHelpers/NoOpTokenService.cs b/web/backend/Database/Database.Seed/DatabaseHelpers/NoOpTokenService.cs index 5720b30c..44df4f12 100644 --- a/web/backend/Database/Database.Seed/DatabaseHelpers/NoOpTokenService.cs +++ b/web/backend/Database/Database.Seed/DatabaseHelpers/NoOpTokenService.cs @@ -1,4 +1,4 @@ -using Features.Auth.Services; +using Features.Users.Services; namespace Database.Seed.DatabaseHelpers; diff --git a/web/backend/Database/Database.Seed/Program.cs b/web/backend/Database/Database.Seed/Program.cs index 2bdffe8d..6121510c 100644 --- a/web/backend/Database/Database.Seed/Program.cs +++ b/web/backend/Database/Database.Seed/Program.cs @@ -1,15 +1,15 @@ using Database.Connection.DependencyInjection; using Database.Seed.DatabaseHelpers; using Database.Seed.Sqlite; -using Features.Auth.Commands.Profile.UploadAvatar; -using Features.Auth.Services; using Features.Breweries.Commands.CreateBrewery; using Features.Breweries.DependencyInjection; using Features.ImageUploads.Commands.UploadPhoto; using Features.ImageUploads.DependencyInjection; using Features.Locations.DependencyInjection; using Features.Locations.Queries.GetCountry; +using Features.Users.Commands.Profile.UploadAvatar; using Features.Users.DependencyInjection; +using Features.Users.Services; using Infrastructure.FileUpload; using MediatR; using Microsoft.Extensions.Configuration; diff --git a/web/backend/Features/Features.Emails.Tests/Notifications/ConfirmationEmailResendRequestedNotificationHandlerTests.cs b/web/backend/Features/Features.Emails.Tests/Notifications/ConfirmationEmailResendRequestedNotificationHandlerTests.cs index c0f7e60a..021d212a 100644 --- a/web/backend/Features/Features.Emails.Tests/Notifications/ConfirmationEmailResendRequestedNotificationHandlerTests.cs +++ b/web/backend/Features/Features.Emails.Tests/Notifications/ConfirmationEmailResendRequestedNotificationHandlerTests.cs @@ -1,6 +1,6 @@ -using Features.Auth.Notifications; using Features.Emails.Notifications; using Features.Emails.Services; +using Features.Users.Notifications; using FluentAssertions; using Microsoft.Extensions.Logging; using Moq; diff --git a/web/backend/Features/Features.Emails.Tests/Notifications/UserRegisteredNotificationHandlerTests.cs b/web/backend/Features/Features.Emails.Tests/Notifications/UserRegisteredNotificationHandlerTests.cs index a2bcf4eb..e7f49208 100644 --- a/web/backend/Features/Features.Emails.Tests/Notifications/UserRegisteredNotificationHandlerTests.cs +++ b/web/backend/Features/Features.Emails.Tests/Notifications/UserRegisteredNotificationHandlerTests.cs @@ -1,6 +1,6 @@ -using Features.Auth.Notifications; using Features.Emails.Notifications; using Features.Emails.Services; +using Features.Users.Notifications; using FluentAssertions; using Microsoft.Extensions.Logging; using Moq; diff --git a/web/backend/Features/Features.Emails/Notifications/ConfirmationEmailResendRequestedNotificationHandler.cs b/web/backend/Features/Features.Emails/Notifications/ConfirmationEmailResendRequestedNotificationHandler.cs index fd6b9422..074071ca 100644 --- a/web/backend/Features/Features.Emails/Notifications/ConfirmationEmailResendRequestedNotificationHandler.cs +++ b/web/backend/Features/Features.Emails/Notifications/ConfirmationEmailResendRequestedNotificationHandler.cs @@ -1,5 +1,5 @@ -using Features.Auth.Notifications; using Features.Emails.Services; +using Features.Users.Notifications; using MediatR; using Microsoft.Extensions.Logging; diff --git a/web/backend/Features/Features.Emails/Notifications/UserRegisteredNotificationHandler.cs b/web/backend/Features/Features.Emails/Notifications/UserRegisteredNotificationHandler.cs index 41e1d893..82c50cb2 100644 --- a/web/backend/Features/Features.Emails/Notifications/UserRegisteredNotificationHandler.cs +++ b/web/backend/Features/Features.Emails/Notifications/UserRegisteredNotificationHandler.cs @@ -1,5 +1,5 @@ -using Features.Auth.Notifications; using Features.Emails.Services; +using Features.Users.Notifications; using MediatR; using Microsoft.Extensions.Logging; diff --git a/web/backend/Features/Features.Users.Tests/Commands/ConfirmUserHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/ConfirmUserHandlerTests.cs index db8d2f0a..aefb5a66 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/ConfirmUserHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/ConfirmUserHandlerTests.cs @@ -1,16 +1,16 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using Domain.Exceptions; -using Features.Auth.Commands.Authentication.ConfirmUser; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Services; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Authentication.ConfirmUser; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Services; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class ConfirmUserHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Commands/DeleteAccountHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/DeleteAccountHandlerTests.cs index 7a51820e..be7fa7b4 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/DeleteAccountHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/DeleteAccountHandlerTests.cs @@ -1,12 +1,12 @@ using Domain.Exceptions; -using Features.Auth.Commands.Account.DeleteAccount; -using Features.Auth.Identity; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Account.DeleteAccount; +using Features.Users.Identity; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class DeleteAccountHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Commands/RefreshTokenHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/RefreshTokenHandlerTests.cs index 11325fc3..6307e1da 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/RefreshTokenHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/RefreshTokenHandlerTests.cs @@ -1,10 +1,10 @@ -using Features.Auth.Commands.Authentication.RefreshToken; -using Features.Auth.Dtos; -using Features.Auth.Services; +using Features.Users.Commands.Authentication.RefreshToken; +using Features.Users.Dtos; +using Features.Users.Services; using FluentAssertions; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class RefreshTokenHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Commands/RegisterUserHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/RegisterUserHandlerTests.cs index 68543336..08db2c38 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/RegisterUserHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/RegisterUserHandlerTests.cs @@ -1,16 +1,16 @@ using Domain.Exceptions; -using Features.Auth.Commands.Authentication.RegisterUser; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Notifications; -using Features.Auth.Services; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Authentication.RegisterUser; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Notifications; +using Features.Users.Services; +using Features.Users.Tests.TestSupport; using FluentAssertions; using MediatR; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class RegisterUserHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Commands/ResendConfirmationEmailHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/ResendConfirmationEmailHandlerTests.cs index 6f460ab6..904df018 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/ResendConfirmationEmailHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/ResendConfirmationEmailHandlerTests.cs @@ -1,13 +1,13 @@ -using Features.Auth.Commands.Authentication.ResendConfirmationEmail; -using Features.Auth.Identity; -using Features.Auth.Notifications; -using Features.Auth.Services; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Authentication.ResendConfirmationEmail; +using Features.Users.Identity; +using Features.Users.Notifications; +using Features.Users.Services; +using Features.Users.Tests.TestSupport; using MediatR; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class ResendConfirmationEmailHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Commands/UpdateEmailHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/UpdateEmailHandlerTests.cs index 2844430c..84f50bcb 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/UpdateEmailHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/UpdateEmailHandlerTests.cs @@ -1,13 +1,13 @@ using Domain.Exceptions; -using Features.Auth.Commands.Account.UpdateEmail; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Account.UpdateEmail; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class UpdateEmailHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Commands/UpdatePasswordHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/UpdatePasswordHandlerTests.cs index 728ffb3b..91ef83ea 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/UpdatePasswordHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/UpdatePasswordHandlerTests.cs @@ -1,13 +1,13 @@ using Domain.Exceptions; -using Features.Auth.Commands.Account.UpdatePassword; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Account.UpdatePassword; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class UpdatePasswordHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Commands/UpdateProfileHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/UpdateProfileHandlerTests.cs index 76db5804..554a6731 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/UpdateProfileHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/UpdateProfileHandlerTests.cs @@ -1,13 +1,13 @@ using Domain.Exceptions; -using Features.Auth.Commands.Profile.UpdateProfile; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Profile.UpdateProfile; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class UpdateProfileHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Commands/UpdateUsernameHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Commands/UpdateUsernameHandlerTests.cs index 7005c3fb..19eeb8b8 100644 --- a/web/backend/Features/Features.Users.Tests/Commands/UpdateUsernameHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Commands/UpdateUsernameHandlerTests.cs @@ -1,13 +1,13 @@ using Domain.Exceptions; -using Features.Auth.Commands.Account.UpdateUsername; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Account.UpdateUsername; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Commands; +namespace Features.Users.Tests.Commands; public class UpdateUsernameHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Features.Users.Tests.csproj b/web/backend/Features/Features.Users.Tests/Features.Users.Tests.csproj index 53d61628..73a87028 100644 --- a/web/backend/Features/Features.Users.Tests/Features.Users.Tests.csproj +++ b/web/backend/Features/Features.Users.Tests/Features.Users.Tests.csproj @@ -4,7 +4,7 @@ enable enable false - Features.Auth.Tests + Features.Users.Tests diff --git a/web/backend/Features/Features.Users.Tests/Queries/GetAllUsersHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Queries/GetAllUsersHandlerTests.cs index 4f2aeb06..6628589f 100644 --- a/web/backend/Features/Features.Users.Tests/Queries/GetAllUsersHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Queries/GetAllUsersHandlerTests.cs @@ -1,10 +1,10 @@ using Domain.Entities; -using Features.Auth.Queries.GetAllUsers; -using Features.Auth.Repository; +using Features.Users.Queries.GetAllUsers; +using Features.Users.Repository; using FluentAssertions; using Moq; -namespace Features.Auth.Tests.Queries; +namespace Features.Users.Tests.Queries; public class GetAllUsersHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Queries/GetUserByIdHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Queries/GetUserByIdHandlerTests.cs index d3d7fbdf..86f00db5 100644 --- a/web/backend/Features/Features.Users.Tests/Queries/GetUserByIdHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Queries/GetUserByIdHandlerTests.cs @@ -1,11 +1,11 @@ using Domain.Entities; using Domain.Exceptions; -using Features.Auth.Queries.GetUserById; -using Features.Auth.Repository; +using Features.Users.Queries.GetUserById; +using Features.Users.Repository; using FluentAssertions; using Moq; -namespace Features.Auth.Tests.Queries; +namespace Features.Users.Tests.Queries; public class GetUserByIdHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Queries/LoginHandlerTests.cs b/web/backend/Features/Features.Users.Tests/Queries/LoginHandlerTests.cs index fe852da6..9b027125 100644 --- a/web/backend/Features/Features.Users.Tests/Queries/LoginHandlerTests.cs +++ b/web/backend/Features/Features.Users.Tests/Queries/LoginHandlerTests.cs @@ -1,14 +1,14 @@ using Domain.Exceptions; -using Features.Auth.Commands.Authentication.Login; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Services; -using Features.Auth.Tests.TestSupport; +using Features.Users.Commands.Authentication.Login; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Services; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.Queries; +namespace Features.Users.Tests.Queries; public class LoginHandlerTests { diff --git a/web/backend/Features/Features.Users.Tests/Services/TokenServiceRefreshTests.cs b/web/backend/Features/Features.Users.Tests/Services/TokenServiceRefreshTests.cs index 2c8c3f0b..581cac4c 100644 --- a/web/backend/Features/Features.Users.Tests/Services/TokenServiceRefreshTests.cs +++ b/web/backend/Features/Features.Users.Tests/Services/TokenServiceRefreshTests.cs @@ -1,9 +1,9 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using Domain.Exceptions; -using Features.Auth.Identity; -using Features.Auth.Services; -using Features.Auth.Tests.TestSupport; +using Features.Users.Identity; +using Features.Users.Services; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Infrastructure.Configuration; using Infrastructure.Jwt; @@ -11,7 +11,7 @@ using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Configuration; using Moq; -namespace Features.Auth.Tests.Services; +namespace Features.Users.Tests.Services; public class TokenServiceRefreshTests { diff --git a/web/backend/Features/Features.Users.Tests/Services/TokenServiceValidationTests.cs b/web/backend/Features/Features.Users.Tests/Services/TokenServiceValidationTests.cs index df73095c..b29fdf4c 100644 --- a/web/backend/Features/Features.Users.Tests/Services/TokenServiceValidationTests.cs +++ b/web/backend/Features/Features.Users.Tests/Services/TokenServiceValidationTests.cs @@ -1,15 +1,15 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using Domain.Exceptions; -using Features.Auth.Services; -using Features.Auth.Tests.TestSupport; +using Features.Users.Services; +using Features.Users.Tests.TestSupport; using FluentAssertions; using Infrastructure.Configuration; using Infrastructure.Jwt; using Microsoft.Extensions.Configuration; using Moq; -namespace Features.Auth.Tests.Services; +namespace Features.Users.Tests.Services; public class TokenServiceValidationTests { diff --git a/web/backend/Features/Features.Users.Tests/TestSupport/UserManagerMockFactory.cs b/web/backend/Features/Features.Users.Tests/TestSupport/UserManagerMockFactory.cs index 2e956558..b45d7e86 100644 --- a/web/backend/Features/Features.Users.Tests/TestSupport/UserManagerMockFactory.cs +++ b/web/backend/Features/Features.Users.Tests/TestSupport/UserManagerMockFactory.cs @@ -1,8 +1,8 @@ -using Features.Auth.Identity; +using Features.Users.Identity; using Microsoft.AspNetCore.Identity; using Moq; -namespace Features.Auth.Tests.TestSupport; +namespace Features.Users.Tests.TestSupport; public static class UserManagerMockFactory { diff --git a/web/backend/Features/Features.Users/Commands/Account/DeleteAccount/DeleteAccountCommand.cs b/web/backend/Features/Features.Users/Commands/Account/DeleteAccount/DeleteAccountCommand.cs index 059d4ff2..bce006bd 100644 --- a/web/backend/Features/Features.Users/Commands/Account/DeleteAccount/DeleteAccountCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Account/DeleteAccount/DeleteAccountCommand.cs @@ -1,6 +1,6 @@ using MediatR; -namespace Features.Auth.Commands.Account.DeleteAccount; +namespace Features.Users.Commands.Account.DeleteAccount; /// Permanently deletes the given user account. /// diff --git a/web/backend/Features/Features.Users/Commands/Account/DeleteAccount/DeleteAccountHandler.cs b/web/backend/Features/Features.Users/Commands/Account/DeleteAccount/DeleteAccountHandler.cs index 36b632c4..8e5bda11 100644 --- a/web/backend/Features/Features.Users/Commands/Account/DeleteAccount/DeleteAccountHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Account/DeleteAccount/DeleteAccountHandler.cs @@ -1,9 +1,9 @@ using Domain.Exceptions; -using Features.Auth.Identity; +using Features.Users.Identity; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Account.DeleteAccount; +namespace Features.Users.Commands.Account.DeleteAccount; /// Handles by deleting the user via . public class DeleteAccountHandler(UserManager userManager) diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailCommand.cs b/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailCommand.cs index a20fc44a..40250df7 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailCommand.cs @@ -1,7 +1,7 @@ -using Features.Auth.Dtos; +using Features.Users.Dtos; using MediatR; -namespace Features.Auth.Commands.Account.UpdateEmail; +namespace Features.Users.Commands.Account.UpdateEmail; /// /// Changes the email address of the given user account. The account's EmailConfirmed status diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailHandler.cs b/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailHandler.cs index 7e81c150..69eb742b 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailHandler.cs @@ -1,10 +1,10 @@ using Domain.Exceptions; -using Features.Auth.Dtos; -using Features.Auth.Identity; +using Features.Users.Dtos; +using Features.Users.Identity; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Account.UpdateEmail; +namespace Features.Users.Commands.Account.UpdateEmail; /// /// Handles via . diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailValidator.cs b/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailValidator.cs index ff988562..82f4f54b 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailValidator.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdateEmail/UpdateEmailValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; -namespace Features.Auth.Commands.Account.UpdateEmail; +namespace Features.Users.Commands.Account.UpdateEmail; /// Validates , mirroring the email rules in RegisterUserValidator. public class UpdateEmailValidator : AbstractValidator diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordCommand.cs b/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordCommand.cs index b43fdcdc..ed09641f 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordCommand.cs @@ -1,7 +1,7 @@ -using Features.Auth.Dtos; +using Features.Users.Dtos; using MediatR; -namespace Features.Auth.Commands.Account.UpdatePassword; +namespace Features.Users.Commands.Account.UpdatePassword; /// Changes the password of the given user account, verifying the current password first. /// diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordHandler.cs b/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordHandler.cs index e34d96dd..1cd1eec1 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordHandler.cs @@ -1,10 +1,10 @@ using Domain.Exceptions; -using Features.Auth.Dtos; -using Features.Auth.Identity; +using Features.Users.Dtos; +using Features.Users.Identity; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Account.UpdatePassword; +namespace Features.Users.Commands.Account.UpdatePassword; /// /// Handles via , diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordValidator.cs b/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordValidator.cs index 153aff7b..34811edf 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordValidator.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdatePassword/UpdatePasswordValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; -namespace Features.Auth.Commands.Account.UpdatePassword; +namespace Features.Users.Commands.Account.UpdatePassword; /// Validates , mirroring the password rules in RegisterUserValidator. public class UpdatePasswordValidator : AbstractValidator diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameCommand.cs b/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameCommand.cs index 8733f379..7527e0e1 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameCommand.cs @@ -1,7 +1,7 @@ -using Features.Auth.Dtos; +using Features.Users.Dtos; using MediatR; -namespace Features.Auth.Commands.Account.UpdateUsername; +namespace Features.Users.Commands.Account.UpdateUsername; /// Changes the username of the given user account. /// diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameHandler.cs b/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameHandler.cs index 4f179ec8..ba812c1b 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameHandler.cs @@ -1,10 +1,10 @@ using Domain.Exceptions; -using Features.Auth.Dtos; -using Features.Auth.Identity; +using Features.Users.Dtos; +using Features.Users.Identity; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Account.UpdateUsername; +namespace Features.Users.Commands.Account.UpdateUsername; /// Handles via . public class UpdateUsernameHandler(UserManager userManager) diff --git a/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameValidator.cs b/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameValidator.cs index 3baea3c5..ec4c4d92 100644 --- a/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameValidator.cs +++ b/web/backend/Features/Features.Users/Commands/Account/UpdateUsername/UpdateUsernameValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; -namespace Features.Auth.Commands.Account.UpdateUsername; +namespace Features.Users.Commands.Account.UpdateUsername; /// Validates , mirroring the username rules in RegisterUserValidator. public class UpdateUsernameValidator : AbstractValidator diff --git a/web/backend/Features/Features.Users/Commands/Authentication/ConfirmUser/ConfirmUserCommand.cs b/web/backend/Features/Features.Users/Commands/Authentication/ConfirmUser/ConfirmUserCommand.cs index e72583b9..7c9c9ff9 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/ConfirmUser/ConfirmUserCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/ConfirmUser/ConfirmUserCommand.cs @@ -1,7 +1,7 @@ -using Features.Auth.Dtos; +using Features.Users.Dtos; using MediatR; -namespace Features.Auth.Commands.Authentication.ConfirmUser; +namespace Features.Users.Commands.Authentication.ConfirmUser; /// Validates a confirmation token and confirms the corresponding user account. public record ConfirmUserCommand(string Token) : IRequest; diff --git a/web/backend/Features/Features.Users/Commands/Authentication/ConfirmUser/ConfirmUserHandler.cs b/web/backend/Features/Features.Users/Commands/Authentication/ConfirmUser/ConfirmUserHandler.cs index 524ff749..24bc78db 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/ConfirmUser/ConfirmUserHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/ConfirmUser/ConfirmUserHandler.cs @@ -1,11 +1,11 @@ using Domain.Exceptions; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Services; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Services; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Authentication.ConfirmUser; +namespace Features.Users.Commands.Authentication.ConfirmUser; /// /// Handles by validating the confirmation token and marking the diff --git a/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginCommand.cs b/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginCommand.cs index 883f251f..cea6ef69 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginCommand.cs @@ -1,7 +1,7 @@ -using Features.Auth.Dtos; +using Features.Users.Dtos; using MediatR; -namespace Features.Auth.Commands.Authentication.Login; +namespace Features.Users.Commands.Authentication.Login; /// /// Authenticates a user using their username and password and issues new tokens. Bound directly diff --git a/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginHandler.cs b/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginHandler.cs index 95aeaead..19fdbcd0 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginHandler.cs @@ -1,11 +1,11 @@ using Domain.Exceptions; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Services; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Services; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Authentication.Login; +namespace Features.Users.Commands.Authentication.Login; /// /// Handles by verifying credentials via diff --git a/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginValidator.cs b/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginValidator.cs index d7ea5468..09e8f35f 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginValidator.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/Login/LoginValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; -namespace Features.Auth.Commands.Authentication.Login; +namespace Features.Users.Commands.Authentication.Login; /// Validates that and are present. public class LoginValidator : AbstractValidator diff --git a/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenCommand.cs b/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenCommand.cs index 05ea189e..64830125 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenCommand.cs @@ -1,7 +1,7 @@ -using Features.Auth.Dtos; +using Features.Users.Dtos; using MediatR; -namespace Features.Auth.Commands.Authentication.RefreshToken; +namespace Features.Users.Commands.Authentication.RefreshToken; /// /// Exchanges a valid refresh token for a new access/refresh token pair. Constructed from the diff --git a/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenHandler.cs b/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenHandler.cs index 9ee3c144..4bd850de 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenHandler.cs @@ -1,8 +1,8 @@ -using Features.Auth.Dtos; -using Features.Auth.Services; +using Features.Users.Dtos; +using Features.Users.Services; using MediatR; -namespace Features.Auth.Commands.Authentication.RefreshToken; +namespace Features.Users.Commands.Authentication.RefreshToken; /// /// Handles by validating the refresh token and issuing a new diff --git a/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenValidator.cs b/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenValidator.cs index dd1dcfa6..2687c4cb 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenValidator.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/RefreshToken/RefreshTokenValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; -namespace Features.Auth.Commands.Authentication.RefreshToken; +namespace Features.Users.Commands.Authentication.RefreshToken; /// Validates that is present. public class RefreshTokenValidator : AbstractValidator diff --git a/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserCommand.cs b/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserCommand.cs index 128c6086..ace36a62 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserCommand.cs @@ -1,7 +1,7 @@ -using Features.Auth.Dtos; +using Features.Users.Dtos; using MediatR; -namespace Features.Auth.Commands.Authentication.RegisterUser; +namespace Features.Users.Commands.Authentication.RegisterUser; /// /// Registers a new user account. Bound directly from the request body of POST /api/auth/register. diff --git a/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserHandler.cs b/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserHandler.cs index 077b2223..6564e389 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserHandler.cs @@ -1,14 +1,14 @@ using Domain.Entities; using Domain.Exceptions; -using Features.Auth.Commands.Profile.CreateUserProfile; -using Features.Auth.Dtos; -using Features.Auth.Identity; -using Features.Auth.Notifications; -using Features.Auth.Services; +using Features.Users.Commands.Profile.CreateUserProfile; +using Features.Users.Dtos; +using Features.Users.Identity; +using Features.Users.Notifications; +using Features.Users.Services; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Authentication.RegisterUser; +namespace Features.Users.Commands.Authentication.RegisterUser; /// /// Handles : creates the user via diff --git a/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserValidator.cs b/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserValidator.cs index 219f674c..44a031bd 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserValidator.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/RegisterUser/RegisterUserValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; -namespace Features.Auth.Commands.Authentication.RegisterUser; +namespace Features.Users.Commands.Authentication.RegisterUser; /// /// Validates the field-level constraints on : username format and diff --git a/web/backend/Features/Features.Users/Commands/Authentication/ResendConfirmationEmail/ResendConfirmationEmailCommand.cs b/web/backend/Features/Features.Users/Commands/Authentication/ResendConfirmationEmail/ResendConfirmationEmailCommand.cs index d9fd25c2..473a7ad9 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/ResendConfirmationEmail/ResendConfirmationEmailCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/ResendConfirmationEmail/ResendConfirmationEmailCommand.cs @@ -1,6 +1,6 @@ using MediatR; -namespace Features.Auth.Commands.Authentication.ResendConfirmationEmail; +namespace Features.Users.Commands.Authentication.ResendConfirmationEmail; /// Resends the account confirmation email to a user, generating a fresh confirmation token. public record ResendConfirmationEmailCommand(Guid UserId) : IRequest; diff --git a/web/backend/Features/Features.Users/Commands/Authentication/ResendConfirmationEmail/ResendConfirmationEmailHandler.cs b/web/backend/Features/Features.Users/Commands/Authentication/ResendConfirmationEmail/ResendConfirmationEmailHandler.cs index 69edb439..469e165b 100644 --- a/web/backend/Features/Features.Users/Commands/Authentication/ResendConfirmationEmail/ResendConfirmationEmailHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Authentication/ResendConfirmationEmail/ResendConfirmationEmailHandler.cs @@ -1,10 +1,10 @@ -using Features.Auth.Identity; -using Features.Auth.Notifications; -using Features.Auth.Services; +using Features.Users.Identity; +using Features.Users.Notifications; +using Features.Users.Services; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Authentication.ResendConfirmationEmail; +namespace Features.Users.Commands.Authentication.ResendConfirmationEmail; /// /// Handles by generating a fresh confirmation token and diff --git a/web/backend/Features/Features.Users/Commands/Profile/CreateUserProfile/CreateUserProfileCommand.cs b/web/backend/Features/Features.Users/Commands/Profile/CreateUserProfile/CreateUserProfileCommand.cs index cb60b7bd..b449ccdc 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/CreateUserProfile/CreateUserProfileCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/CreateUserProfile/CreateUserProfileCommand.cs @@ -1,6 +1,6 @@ using MediatR; -namespace Features.Auth.Commands.Profile.CreateUserProfile; +namespace Features.Users.Commands.Profile.CreateUserProfile; /// Creates a new user profile for a user account. public record CreateUserProfileCommand(Guid UserAccountId, string Biography) : IRequest; diff --git a/web/backend/Features/Features.Users/Commands/Profile/CreateUserProfile/CreateUserProfileHandler.cs b/web/backend/Features/Features.Users/Commands/Profile/CreateUserProfile/CreateUserProfileHandler.cs index 3c8c12a0..27c00096 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/CreateUserProfile/CreateUserProfileHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/CreateUserProfile/CreateUserProfileHandler.cs @@ -1,7 +1,7 @@ -using Features.Auth.Repository; +using Features.Users.Repository; using MediatR; -namespace Features.Auth.Commands.Profile.CreateUserProfile; +namespace Features.Users.Commands.Profile.CreateUserProfile; /// Handles by inserting the new profile record. public class CreateUserProfileHandler(IUserProfileRepository userProfileRepository) diff --git a/web/backend/Features/Features.Users/Commands/Profile/UpdateBiography/UpdateBiographyCommand.cs b/web/backend/Features/Features.Users/Commands/Profile/UpdateBiography/UpdateBiographyCommand.cs index 1c1f06bd..e92f5993 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/UpdateBiography/UpdateBiographyCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/UpdateBiography/UpdateBiographyCommand.cs @@ -1,6 +1,6 @@ using MediatR; -namespace Features.Auth.Commands.Profile.UpdateBiography; +namespace Features.Users.Commands.Profile.UpdateBiography; /// Updates the biography of the given user account's profile. /// diff --git a/web/backend/Features/Features.Users/Commands/Profile/UpdateBiography/UpdateBiographyHandler.cs b/web/backend/Features/Features.Users/Commands/Profile/UpdateBiography/UpdateBiographyHandler.cs index e55048c6..d5ea48c2 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/UpdateBiography/UpdateBiographyHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/UpdateBiography/UpdateBiographyHandler.cs @@ -1,7 +1,7 @@ -using Features.Auth.Repository; +using Features.Users.Repository; using MediatR; -namespace Features.Auth.Commands.Profile.UpdateBiography; +namespace Features.Users.Commands.Profile.UpdateBiography; /// Handles by updating the stored biography. public class UpdateBiographyHandler(IUserProfileRepository userProfileRepository) diff --git a/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileCommand.cs b/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileCommand.cs index b91d1366..ac465ec7 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileCommand.cs @@ -1,7 +1,7 @@ -using Features.Auth.Dtos; +using Features.Users.Dtos; using MediatR; -namespace Features.Auth.Commands.Profile.UpdateProfile; +namespace Features.Users.Commands.Profile.UpdateProfile; /// /// Updates the non-credential profile fields (first name, last name, date of birth) of the given diff --git a/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileHandler.cs b/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileHandler.cs index 04a80d4e..ba0e526a 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileHandler.cs @@ -1,10 +1,10 @@ using Domain.Exceptions; -using Features.Auth.Dtos; -using Features.Auth.Identity; +using Features.Users.Dtos; +using Features.Users.Identity; using MediatR; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Commands.Profile.UpdateProfile; +namespace Features.Users.Commands.Profile.UpdateProfile; /// /// Handles via . First/last name diff --git a/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileValidator.cs b/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileValidator.cs index 09530360..63f812e2 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileValidator.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/UpdateProfile/UpdateProfileValidator.cs @@ -1,6 +1,6 @@ using FluentValidation; -namespace Features.Auth.Commands.Profile.UpdateProfile; +namespace Features.Users.Commands.Profile.UpdateProfile; /// Validates , mirroring the profile rules in RegisterUserValidator. public class UpdateProfileValidator : AbstractValidator diff --git a/web/backend/Features/Features.Users/Commands/Profile/UploadAvatar/UploadAvatarCommand.cs b/web/backend/Features/Features.Users/Commands/Profile/UploadAvatar/UploadAvatarCommand.cs index 09a63922..874e6858 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/UploadAvatar/UploadAvatarCommand.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/UploadAvatar/UploadAvatarCommand.cs @@ -1,7 +1,7 @@ using MediatR; using Microsoft.AspNetCore.Http; -namespace Features.Auth.Commands.Profile.UploadAvatar; +namespace Features.Users.Commands.Profile.UploadAvatar; /// Uploads a new avatar photo for a user account, replacing any existing avatar. public record UploadAvatarCommand(Guid UserAccountId, IFormFile File) : IRequest; diff --git a/web/backend/Features/Features.Users/Commands/Profile/UploadAvatar/UploadAvatarHandler.cs b/web/backend/Features/Features.Users/Commands/Profile/UploadAvatar/UploadAvatarHandler.cs index 99c05bb6..50696b50 100644 --- a/web/backend/Features/Features.Users/Commands/Profile/UploadAvatar/UploadAvatarHandler.cs +++ b/web/backend/Features/Features.Users/Commands/Profile/UploadAvatar/UploadAvatarHandler.cs @@ -1,9 +1,9 @@ using Domain.Entities; -using Features.Auth.Repository; using Features.ImageUploads.Commands.UploadPhoto; +using Features.Users.Repository; using MediatR; -namespace Features.Auth.Commands.Profile.UploadAvatar; +namespace Features.Users.Commands.Profile.UploadAvatar; /// /// Handles : uploads the photo via , diff --git a/web/backend/Features/Features.Users/Controllers/AuthController.cs b/web/backend/Features/Features.Users/Controllers/AuthController.cs index ff1b6f87..2bcbc38b 100644 --- a/web/backend/Features/Features.Users/Controllers/AuthController.cs +++ b/web/backend/Features/Features.Users/Controllers/AuthController.cs @@ -1,20 +1,20 @@ -using Features.Auth.Commands.Account.DeleteAccount; -using Features.Auth.Commands.Account.UpdateEmail; -using Features.Auth.Commands.Account.UpdatePassword; -using Features.Auth.Commands.Account.UpdateUsername; -using Features.Auth.Commands.Authentication.ConfirmUser; -using Features.Auth.Commands.Authentication.Login; -using Features.Auth.Commands.Authentication.RefreshToken; -using Features.Auth.Commands.Authentication.RegisterUser; -using Features.Auth.Commands.Authentication.ResendConfirmationEmail; -using Features.Auth.Commands.Profile.UpdateProfile; -using Features.Auth.Dtos; +using Features.Users.Commands.Account.DeleteAccount; +using Features.Users.Commands.Account.UpdateEmail; +using Features.Users.Commands.Account.UpdatePassword; +using Features.Users.Commands.Account.UpdateUsername; +using Features.Users.Commands.Authentication.ConfirmUser; +using Features.Users.Commands.Authentication.Login; +using Features.Users.Commands.Authentication.RefreshToken; +using Features.Users.Commands.Authentication.RegisterUser; +using Features.Users.Commands.Authentication.ResendConfirmationEmail; +using Features.Users.Commands.Profile.UpdateProfile; +using Features.Users.Dtos; using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Shared.Contracts; -namespace Features.Auth.Controllers; +namespace Features.Users.Controllers; /// /// Handles user authentication concerns: registration, login, email confirmation, token refresh, and diff --git a/web/backend/Features/Features.Users/Controllers/UserController.cs b/web/backend/Features/Features.Users/Controllers/UserController.cs index 86d4827c..beb75d8c 100644 --- a/web/backend/Features/Features.Users/Controllers/UserController.cs +++ b/web/backend/Features/Features.Users/Controllers/UserController.cs @@ -1,11 +1,11 @@ using Domain.Entities; using Domain.Exceptions; -using Features.Auth.Queries.GetAllUsers; -using Features.Auth.Queries.GetUserById; +using Features.Users.Queries.GetAllUsers; +using Features.Users.Queries.GetUserById; using MediatR; using Microsoft.AspNetCore.Mvc; -namespace Features.Auth.Controllers; +namespace Features.Users.Controllers; /// /// Exposes read endpoints for user accounts. diff --git a/web/backend/Features/Features.Users/DependencyInjection/FeaturesUsersServiceCollectionExtensions.cs b/web/backend/Features/Features.Users/DependencyInjection/FeaturesUsersServiceCollectionExtensions.cs index b4031ff8..7c23bf65 100644 --- a/web/backend/Features/Features.Users/DependencyInjection/FeaturesUsersServiceCollectionExtensions.cs +++ b/web/backend/Features/Features.Users/DependencyInjection/FeaturesUsersServiceCollectionExtensions.cs @@ -1,6 +1,6 @@ -using Features.Auth.Identity; -using Features.Auth.Repository; -using Features.Auth.Services; +using Features.Users.Identity; +using Features.Users.Repository; +using Features.Users.Services; using Infrastructure.PasswordHashing; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.DependencyInjection; diff --git a/web/backend/Features/Features.Users/Dtos/AuthPayloads.cs b/web/backend/Features/Features.Users/Dtos/AuthPayloads.cs index d63d3eaf..0690ca2d 100644 --- a/web/backend/Features/Features.Users/Dtos/AuthPayloads.cs +++ b/web/backend/Features/Features.Users/Dtos/AuthPayloads.cs @@ -1,4 +1,4 @@ -namespace Features.Auth.Dtos; +namespace Features.Users.Dtos; /// Payload returned to the client after a successful login or token refresh. public record LoginPayload( diff --git a/web/backend/Features/Features.Users/Features.Users.csproj b/web/backend/Features/Features.Users/Features.Users.csproj index b7439890..7cd6297a 100644 --- a/web/backend/Features/Features.Users/Features.Users.csproj +++ b/web/backend/Features/Features.Users/Features.Users.csproj @@ -4,7 +4,7 @@ enable enable - Features.Auth + Features.Users diff --git a/web/backend/Features/Features.Users/Identity/ApplicationUser.cs b/web/backend/Features/Features.Users/Identity/ApplicationUser.cs index 9b015bc6..0d769e9a 100644 --- a/web/backend/Features/Features.Users/Identity/ApplicationUser.cs +++ b/web/backend/Features/Features.Users/Identity/ApplicationUser.cs @@ -1,4 +1,4 @@ -namespace Features.Auth.Identity; +namespace Features.Users.Identity; /// /// The user type driving for diff --git a/web/backend/Features/Features.Users/Identity/Argon2PasswordHasher.cs b/web/backend/Features/Features.Users/Identity/Argon2PasswordHasher.cs index 76355634..824b4afd 100644 --- a/web/backend/Features/Features.Users/Identity/Argon2PasswordHasher.cs +++ b/web/backend/Features/Features.Users/Identity/Argon2PasswordHasher.cs @@ -1,7 +1,7 @@ using Infrastructure.PasswordHashing; using Microsoft.AspNetCore.Identity; -namespace Features.Auth.Identity; +namespace Features.Users.Identity; /// Adapts 's Argon2 hashing to . public sealed class Argon2PasswordHasher(IPasswordInfrastructure passwordInfrastructure) diff --git a/web/backend/Features/Features.Users/Identity/DapperUserStore.cs b/web/backend/Features/Features.Users/Identity/DapperUserStore.cs index df2d63ef..c7092f7d 100644 --- a/web/backend/Features/Features.Users/Identity/DapperUserStore.cs +++ b/web/backend/Features/Features.Users/Identity/DapperUserStore.cs @@ -4,7 +4,7 @@ using Database.Connection; using Microsoft.AspNetCore.Identity; using Microsoft.Data.SqlClient; -namespace Features.Auth.Identity; +namespace Features.Users.Identity; /// /// Dapper-based implementation of the ASP.NET Core Identity store interfaces consumed by diff --git a/web/backend/Features/Features.Users/Identity/UserAccountExtensions.cs b/web/backend/Features/Features.Users/Identity/UserAccountExtensions.cs index 24c11c5a..b2eb3815 100644 --- a/web/backend/Features/Features.Users/Identity/UserAccountExtensions.cs +++ b/web/backend/Features/Features.Users/Identity/UserAccountExtensions.cs @@ -1,6 +1,6 @@ using Domain.Entities; -namespace Features.Auth.Identity; +namespace Features.Users.Identity; /// /// Converts the persistence-agnostic domain entity into the diff --git a/web/backend/Features/Features.Users/Notifications/ConfirmationEmailResendRequestedNotification.cs b/web/backend/Features/Features.Users/Notifications/ConfirmationEmailResendRequestedNotification.cs index ef731dd1..72ac9383 100644 --- a/web/backend/Features/Features.Users/Notifications/ConfirmationEmailResendRequestedNotification.cs +++ b/web/backend/Features/Features.Users/Notifications/ConfirmationEmailResendRequestedNotification.cs @@ -1,6 +1,6 @@ using MediatR; -namespace Features.Auth.Notifications; +namespace Features.Users.Notifications; /// /// Published after a user requests a fresh confirmation link. Handled by Features.Emails to send the diff --git a/web/backend/Features/Features.Users/Notifications/UserRegisteredNotification.cs b/web/backend/Features/Features.Users/Notifications/UserRegisteredNotification.cs index fb54185d..bdb568e6 100644 --- a/web/backend/Features/Features.Users/Notifications/UserRegisteredNotification.cs +++ b/web/backend/Features/Features.Users/Notifications/UserRegisteredNotification.cs @@ -1,6 +1,6 @@ using MediatR; -namespace Features.Auth.Notifications; +namespace Features.Users.Notifications; /// /// Published after a new user registers. Handled by Features.Emails to send the registration diff --git a/web/backend/Features/Features.Users/Queries/GetAllUsers/GetAllUsersHandler.cs b/web/backend/Features/Features.Users/Queries/GetAllUsers/GetAllUsersHandler.cs index 201c35be..a376c092 100644 --- a/web/backend/Features/Features.Users/Queries/GetAllUsers/GetAllUsersHandler.cs +++ b/web/backend/Features/Features.Users/Queries/GetAllUsers/GetAllUsersHandler.cs @@ -1,8 +1,8 @@ using Domain.Entities; -using Features.Auth.Repository; +using Features.Users.Repository; using MediatR; -namespace Features.Auth.Queries.GetAllUsers; +namespace Features.Users.Queries.GetAllUsers; public class GetAllUsersHandler(IUserListRepository repository) : IRequestHandler> diff --git a/web/backend/Features/Features.Users/Queries/GetAllUsers/GetAllUsersQuery.cs b/web/backend/Features/Features.Users/Queries/GetAllUsers/GetAllUsersQuery.cs index e000063e..708f62d8 100644 --- a/web/backend/Features/Features.Users/Queries/GetAllUsers/GetAllUsersQuery.cs +++ b/web/backend/Features/Features.Users/Queries/GetAllUsers/GetAllUsersQuery.cs @@ -1,7 +1,7 @@ using Domain.Entities; using MediatR; -namespace Features.Auth.Queries.GetAllUsers; +namespace Features.Users.Queries.GetAllUsers; /// /// Requests a page of user accounts, ordered by creation date descending. diff --git a/web/backend/Features/Features.Users/Queries/GetUserById/GetUserByIdHandler.cs b/web/backend/Features/Features.Users/Queries/GetUserById/GetUserByIdHandler.cs index 8d83c112..76e770d7 100644 --- a/web/backend/Features/Features.Users/Queries/GetUserById/GetUserByIdHandler.cs +++ b/web/backend/Features/Features.Users/Queries/GetUserById/GetUserByIdHandler.cs @@ -1,9 +1,9 @@ using Domain.Entities; using Domain.Exceptions; -using Features.Auth.Repository; +using Features.Users.Repository; using MediatR; -namespace Features.Auth.Queries.GetUserById; +namespace Features.Users.Queries.GetUserById; public class GetUserByIdHandler(IUserListRepository repository) : IRequestHandler diff --git a/web/backend/Features/Features.Users/Queries/GetUserById/GetUserByIdQuery.cs b/web/backend/Features/Features.Users/Queries/GetUserById/GetUserByIdQuery.cs index 80328852..94953271 100644 --- a/web/backend/Features/Features.Users/Queries/GetUserById/GetUserByIdQuery.cs +++ b/web/backend/Features/Features.Users/Queries/GetUserById/GetUserByIdQuery.cs @@ -1,6 +1,6 @@ using Domain.Entities; using MediatR; -namespace Features.Auth.Queries.GetUserById; +namespace Features.Users.Queries.GetUserById; public record GetUserByIdQuery(Guid UserAccountId) : IRequest; diff --git a/web/backend/Features/Features.Users/Repository/IUserListRepository.cs b/web/backend/Features/Features.Users/Repository/IUserListRepository.cs index 954d37ab..86c1290d 100644 --- a/web/backend/Features/Features.Users/Repository/IUserListRepository.cs +++ b/web/backend/Features/Features.Users/Repository/IUserListRepository.cs @@ -1,6 +1,6 @@ using Domain.Entities; -namespace Features.Auth.Repository; +namespace Features.Users.Repository; /// /// Read access for user account listing. Everything else on user accounts (lookup by diff --git a/web/backend/Features/Features.Users/Repository/IUserProfileRepository.cs b/web/backend/Features/Features.Users/Repository/IUserProfileRepository.cs index 9472b9b5..1131fa37 100644 --- a/web/backend/Features/Features.Users/Repository/IUserProfileRepository.cs +++ b/web/backend/Features/Features.Users/Repository/IUserProfileRepository.cs @@ -1,6 +1,6 @@ using Domain.Entities; -namespace Features.Auth.Repository; +namespace Features.Users.Repository; /// /// Repository for user profile records and their avatars. diff --git a/web/backend/Features/Features.Users/Repository/UserListRepository.cs b/web/backend/Features/Features.Users/Repository/UserListRepository.cs index d43fafc0..deb04bd8 100644 --- a/web/backend/Features/Features.Users/Repository/UserListRepository.cs +++ b/web/backend/Features/Features.Users/Repository/UserListRepository.cs @@ -3,7 +3,7 @@ using Dapper; using Database.Connection; using Domain.Entities; -namespace Features.Auth.Repository; +namespace Features.Users.Repository; /// /// Dapper-based implementation of . diff --git a/web/backend/Features/Features.Users/Repository/UserProfileRepository.cs b/web/backend/Features/Features.Users/Repository/UserProfileRepository.cs index 5eb5d78c..bf0b2804 100644 --- a/web/backend/Features/Features.Users/Repository/UserProfileRepository.cs +++ b/web/backend/Features/Features.Users/Repository/UserProfileRepository.cs @@ -4,7 +4,7 @@ using Database.Connection; using Domain.Entities; using Domain.Exceptions; -namespace Features.Auth.Repository; +namespace Features.Users.Repository; /// /// Dapper-based implementation of . diff --git a/web/backend/Features/Features.Users/Services/ITokenService.cs b/web/backend/Features/Features.Users/Services/ITokenService.cs index ff62f0cc..bb5d6cc4 100644 --- a/web/backend/Features/Features.Users/Services/ITokenService.cs +++ b/web/backend/Features/Features.Users/Services/ITokenService.cs @@ -1,6 +1,6 @@ using System.Security.Claims; -namespace Features.Auth.Services; +namespace Features.Users.Services; /// /// Identifies the kind of token being generated or validated. diff --git a/web/backend/Features/Features.Users/Services/TokenService.cs b/web/backend/Features/Features.Users/Services/TokenService.cs index 8ed118a2..c738e2db 100644 --- a/web/backend/Features/Features.Users/Services/TokenService.cs +++ b/web/backend/Features/Features.Users/Services/TokenService.cs @@ -1,13 +1,13 @@ using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using Domain.Exceptions; -using Features.Auth.Identity; +using Features.Users.Identity; using Infrastructure.Configuration; using Infrastructure.Jwt; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Configuration; -namespace Features.Auth.Services; +namespace Features.Users.Services; /// /// Default implementation of that generates and validates JWTs