Merged
Conversation
Closed
2 tasks
There was a problem hiding this comment.
Pull Request Overview
This PR adds JWT authentication to the Symfony application using the Lexik JWT Authentication Bundle and Gesdinet JWT Refresh Token Bundle. The changes enable secure API authentication with token-based access control and refresh token functionality.
- Integrates JWT authentication bundles (lexik/jwt-authentication-bundle v3.1 and gesdinet/jwt-refresh-token-bundle v1.5)
- Updates User entity to implement UserInterface and adds authentication endpoints
- Configures security settings with stateless JWT authentication and access control rules
Reviewed Changes
Copilot reviewed 11 out of 14 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| symfony.lock | Adds lock entries for the two JWT-related bundles |
| composer.json | Adds dependencies for lexik/jwt-authentication-bundle and gesdinet/jwt-refresh-token-bundle |
| composer.lock | Updates dependency lock file with JWT bundles and upgrades doctrine packages |
| config/bundles.php | Registers LexikJWTAuthenticationBundle and GesdinetJWTRefreshTokenBundle |
| config/packages/security.yaml | Configures JWT-based authentication with json_login, refresh token support, and access control rules |
| config/packages/lexik_jwt_authentication.yaml | Sets up JWT configuration with secret/public keys and passphrase |
| config/packages/gesdinet_jwt_refresh_token.yaml | Configures refresh token entity class |
| config/packages/api_platform.yaml | Adds JWT authorization to Swagger documentation |
| config/routes.yaml | Defines routes for login and token refresh endpoints |
| src/Entity/User.php | Implements UserInterface, adds API operations for login/registration, and includes eraseCredentials method |
| src/Entity/RefreshToken.php | Creates RefreshToken entity extending base bundle class |
| migrations/Version20251112160004.php | Adds database migration for refresh_tokens table and updates user table column lengths |
| .env | Adds JWT environment variables including secret/public key paths and passphrase |
| .gitignore | Excludes JWT private keys from version control |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
* user can create an account * improve tests + wip token into request's header * delete redundant role * improve fixures by adding a admin user * add role hierarchy + only authorized routes for admin user + dont serialize password in json response * update functional tests + fix role logic in controller + wip refactor * refactor tests * fix prettier * delete comments + fix test in ci with jwt keys * Update config/packages/security.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/Controller/RegistrationController.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update config/packages/security.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/Controller/RegistrationController.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Chloe Casali <chloecasali2003@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.