refactor(auth): split application capabilities - #41
Draft
capybaracplusplus wants to merge 1 commit into
Draft
Conversation
capybaracplusplus
force-pushed
the
refactor/auth-password-workflows
branch
from
August 3, 2026 11:10
8decff7 to
8ff99df
Compare
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
AuthServiceand endpoint-specific password classes with four capability services:IdentityService,AuthenticationService,SessionService, andPasswordServiceAuthApplicationComponentcomposition root and expose ordinary C++ services to the HTTP handlersPasswordPolicyandPasswordValidatorfor sign-up, password change, and password resetWhy
The previous
AuthServicemixed identity lifecycle, credential authentication, token rotation, session management, and user lookup in one class. The first extraction also left password behavior split between a single-endpoint use case and a separate reset service. The new boundaries follow stable authentication capabilities instead of HTTP endpoints, reduce constructor and test-fixture scope, and avoid turning every operation into its own service.Behavior
There are no public API, OpenAPI, database-schema, migration, or runtime-configuration changes. Strong reads, enumeration-safe reset requests, PostgreSQL-backed rate limits, refresh-token rotation and reuse detection, hashed reset tokens, transactional outbox delivery, and session revocation semantics remain unchanged. The runtime component name stays
auth-service, so existing YAML configuration remains compatible.Validation
clang-format --dry-run --Werrorgit diff --checkpassed