feat(auth): add JWT login endpoint with CQRS#1
Merged
Merged
Conversation
Add user authentication with Lexik JWT bundle: User entity, login command/handler, Doctrine repository, security config, and migration. Includes unit tests for the login handler. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add unit tests for LoginInput DTO validation and all 10 previously untested Domain handlers (Category, Feed, Article, Bookmark). Add Behat acceptance tests for the login endpoint (7 scenarios). Update existing features to authenticate via JWT. Configure GrumPHP with PHPUnit, Behat and Rector. Add CI coverage threshold (80%) and Behat step. Domain coverage now at 93%. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mark all handler tests and Behat features as Done. Add Auth domain section to roadmap. Add JWT auth, Behat, coverage, and GrumPHP sections to testing guide. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace real passphrase with placeholder in tracked .env file. Actual value lives in gitignored .env.local. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The CI had no JWT key pair, causing all authenticated Behat scenarios to fail with JWTEncodeFailureException. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add JWT authentication layer to the frontend with login page, auth context, protected routes, and automatic Bearer token injection via axios interceptor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add POST /api/v1/auth/register with CQRS pattern, email uniqueness check (409), validation (422), frontend registration form, and full test coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Block login until email is verified. After registration, an HMAC-signed verification link is sent via async email. Adds verify-email and resend-verification endpoints, Mailpit for local dev, and frontend verification pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
thlaure
added a commit
that referenced
this pull request
Mar 14, 2026
feat(auth): add JWT login endpoint with CQRS
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.
Summary
POST /api/login) following CQRS and Hexagonal ArchitectureTest plan
make quality(lint, analyse, rector)make tests-unitto verify LoginHandler tests passPOST /api/loginwith valid credentials returns a JWT tokenPOST /api/loginwith invalid credentials returns 401php bin/console lexik:jwt:generate-keypair)🤖 Generated with Claude Code