Rename auth feature to Features.Users (#281)

This commit is contained in:
Aaron Po
2026-09-06 01:23:51 -04:00
committed by GitHub
parent d958933250
commit 9d5a463d93
79 changed files with 190 additions and 192 deletions

View File

@@ -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;
/// <summary>Validates a confirmation token and confirms the corresponding user account.</summary>
public record ConfirmUserCommand(string Token) : IRequest<ConfirmationPayload>;

View File

@@ -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;
/// <summary>
/// Handles <see cref="ConfirmUserCommand" /> by validating the confirmation token and marking the

View File

@@ -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;
/// <summary>
/// Authenticates a user using their username and password and issues new tokens. Bound directly

View File

@@ -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;
/// <summary>
/// Handles <see cref="LoginCommand" /> by verifying credentials via

View File

@@ -1,6 +1,6 @@
using FluentValidation;
namespace Features.Auth.Commands.Authentication.Login;
namespace Features.Users.Commands.Authentication.Login;
/// <summary>Validates that <see cref="LoginCommand.Username" /> and <see cref="LoginCommand.Password" /> are present.</summary>
public class LoginValidator : AbstractValidator<LoginCommand>

View File

@@ -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;
/// <summary>
/// Exchanges a valid refresh token for a new access/refresh token pair. Constructed from the

View File

@@ -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;
/// <summary>
/// Handles <see cref="RefreshTokenCommand" /> by validating the refresh token and issuing a new

View File

@@ -1,6 +1,6 @@
using FluentValidation;
namespace Features.Auth.Commands.Authentication.RefreshToken;
namespace Features.Users.Commands.Authentication.RefreshToken;
/// <summary>Validates that <see cref="RefreshTokenCommand.RefreshToken" /> is present.</summary>
public class RefreshTokenValidator : AbstractValidator<RefreshTokenCommand>

View File

@@ -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;
/// <summary>
/// Registers a new user account. Bound directly from the request body of <c>POST /api/auth/register</c>.

View File

@@ -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;
/// <summary>
/// Handles <see cref="RegisterUserCommand" />: creates the user via <see cref="UserManager{TUser}" />

View File

@@ -1,6 +1,6 @@
using FluentValidation;
namespace Features.Auth.Commands.Authentication.RegisterUser;
namespace Features.Users.Commands.Authentication.RegisterUser;
/// <summary>
/// Validates the field-level constraints on <see cref="RegisterUserCommand" />: username format and

View File

@@ -1,6 +1,6 @@
using MediatR;
namespace Features.Auth.Commands.Authentication.ResendConfirmationEmail;
namespace Features.Users.Commands.Authentication.ResendConfirmationEmail;
/// <summary>Resends the account confirmation email to a user, generating a fresh confirmation token.</summary>
public record ResendConfirmationEmailCommand(Guid UserId) : IRequest;

View File

@@ -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;
/// <summary>
/// Handles <see cref="ResendConfirmationEmailCommand" /> by generating a fresh confirmation token and