-
-
Notifications
You must be signed in to change notification settings - Fork 1
Video #8 #16
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 #8 #16
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 introduces JWT-based authentication and refactors the EnvManager from a static class to an instance-based service. The changes remove the HelloWorld service and replace it with a proper login authentication flow.
- Replaces
HelloServicewithLoginPostServiceimplementing JWT authentication - Refactors
EnvManagerfrom static methods to instance-based with dependency injection - Adds JWT token validation middleware chain (presence, structure, claims, user)
- Introduces caching support for token storage
Reviewed Changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/Domain/Services/Hello/HelloServiceTest.php | Removed obsolete HelloWorld service tests |
| tests/Unit/Domain/Services/Auth/LoginPostServiceTest.php | Added comprehensive login authentication tests |
| tests/Unit/Domain/Services/User/UserServiceTest.php | Updated to use instance-based EnvManager and added JWT token support |
| tests/Unit/Domain/Components/Providers/ErrorHandlerProviderTest.php | Updated to use instance-based EnvManager and refactored shutdown handler |
| tests/Unit/Domain/Components/Middleware/* | Added test coverage for JWT validation middleware chain |
| tests/Unit/Domain/Components/Encryption/JWTTokenTest.php | Added comprehensive JWT token generation and validation tests |
| tests/Unit/Domain/Components/Env/EnvManagerTest.php | Refactored tests for instance-based EnvManager |
| tests/AbstractUnitTestCase.php | Added JWT token generation helper method |
| src/Domain/Services/Hello/HelloService.php | Removed HelloWorld service |
| src/Domain/Services/Auth/LoginPostService.php | Implemented login authentication with JWT token generation |
| src/Domain/Components/Middleware/* | Added JWT validation middleware components |
| src/Domain/Components/Env/EnvManager.php | Refactored from static to instance-based, extends Collection |
| src/Domain/Components/Encryption/JWTToken.php | Implemented JWT token generation, validation, and user retrieval |
| src/Domain/Components/Container.php | Updated service definitions for new authentication components |
💡 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>
No description provided.