Skip to content

Fix/idn 02 controller - #45

Merged
nole78 merged 2 commits into
feature/IDN-02-safe-login-logoutfrom
fix/IDN-02-controller
Nov 3, 2026
Merged

nole78 merged 2 commits into
feature/IDN-02-safe-login-logoutfrom
fix/IDN-02-controller

Conversation

@nole78

@nole78 nole78 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Component and requirement IDs

  • Component:
  • Requirements:
  • Author(s):

Changes

Verification

Architecture and data flow

This pull request consolidates the authentication-related API endpoints (login, logout, and me) into a single AuthController, introduces new service interfaces for login and logout operations, and updates the dependency injection and tests accordingly. The changes improve code organization, testability, and adherence to interface-based programming.

Key changes include:

API Controller Refactoring:

  • Combined the separate LoginController, LogoutController, and MeController into a unified AuthController handling all authentication endpoints (/api/auth/login, /api/auth/logout, /api/auth/me). This centralizes authentication logic and simplifies route management. [1] [2] [3] [4]

Service Abstraction and Implementation:

  • Introduced ILoginService and ILogoutService interfaces to abstract login and logout logic, and updated LoginService and LogoutService to implement these interfaces. This enhances testability and flexibility for authentication services. [1] [2] [3] [4]

Dependency Injection Updates:

  • Updated dependency injection registrations in Program.cs to use the new ILoginService and ILogoutService abstractions and replaced the old LogoutAccount with LogoutService.

Test Suite Improvements:

  • Replaced and expanded controller tests with AuthControllerTests, which now cover all endpoints in the unified controller. Removed obsolete controller tests and updated logout service tests to match the new service and controller structure. [1] [2] [3] [4] [5] [6]

File and Naming Consistency:

  • Renamed LogoutAccount to LogoutService and ensured consistent naming across services, controllers, and tests for clarity and maintainability. [1] [2]

These changes collectively modernize and streamline the authentication subsystem, making it easier to maintain and extend.

Security checks and negative tests

Dependencies

@nole78
nole78 requested a review from milanPR15 November 3, 2026 08:11
@nole78
nole78 merged commit 8d22e2e into feature/IDN-02-safe-login-logout Nov 3, 2026
2 checks passed
@nole78
nole78 deleted the fix/IDN-02-controller branch November 3, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant