-
-
Notifications
You must be signed in to change notification settings - Fork 1
Video #9 #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video #9 #19
Conversation
There was a problem hiding this 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.
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>
No description provided.