Skip to content

Conversation

@niden
Copy link
Member

@niden niden commented Nov 6, 2025

No description provided.

@niden niden requested a review from Copilot November 6, 2025 13:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements CRUD operations for user management and token refresh/logout functionality for the API. It refactors authentication and user services to use abstract base classes and adds comprehensive middleware for token validation.

Key Changes

  • Added User POST, PUT, and DELETE services with full test coverage
  • Implemented token refresh and logout functionality with cache invalidation
  • Refactored service classes to use AbstractUserService and AbstractAuthService base classes
  • Added ValidateTokenRevokedMiddleware to check token validity against cache

Reviewed Changes

Copilot reviewed 38 out of 39 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Domain/Services/User/UserPostService.php New service for creating users with validation and password hashing
src/Domain/Services/User/UserPutService.php New service for updating users with validation
src/Domain/Services/User/UserDeleteService.php New service for deleting users by ID
src/Domain/Services/User/AbstractUserService.php Base class for user services with shared dependencies
src/Domain/Services/Auth/RefreshPostService.php New service for refreshing JWT tokens
src/Domain/Services/Auth/LogoutPostService.php New service for logging out users and invalidating tokens
src/Domain/Services/Auth/AbstractAuthService.php Base class for auth services with shared dependencies
src/Domain/Components/Middleware/ValidateTokenRevokedMiddleware.php Middleware to validate tokens against cache
src/Domain/Components/DataSource/User/UserRepository.php Extended with insert, update, and delete methods
src/Domain/Components/Encryption/JWTToken.php Added refresh token generation and refactored token creation
src/Domain/Components/Cache/Cache.php Added token invalidation for user logout
src/Domain/Components/Enums/Http/RoutesEnum.php Updated routes enum structure with new endpoints
tests/* Comprehensive test coverage for all new services and middleware

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

niden and others added 3 commits November 6, 2025 13:35
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@niden niden merged commit 34ebfda into phalcon:1.x Nov 6, 2025
3 of 6 checks passed
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