chore: remove verified-dead code (token adapter, role domain repo, 2FA setup port)#218
Open
ahmetabdullahgultekin wants to merge 1 commit into
Open
chore: remove verified-dead code (token adapter, role domain repo, 2FA setup port)#218ahmetabdullahgultekin wants to merge 1 commit into
ahmetabdullahgultekin wants to merge 1 commit into
Conversation
…epo, 2FA setup port) Pure removal of code with zero references, verified multiple ways (name-grep across identity-core-api + web-app + client-apps, Spring DI-by-type injection-site analysis, resource/reflection scan). No behavior changes, no enum/config edits. Removed: - infrastructure/adapter/TokenGenerationAdapter.java Second @component impl of TokenGenerationPort. JwtService is @service @primary and also implements the port; all by-type injection sites resolve to JwtService. Adapter had no name/qualifier references. - domain/repository/RoleDomainRepository.java infrastructure/adapter/RoleDomainRepositoryAdapter.java Domain-model repo port + its @repository adapter. Interface had zero injection sites; ManageRoleService uses RoleRepositoryPort instead. - application/port/input/Setup2FAUseCase.java application/dto/response/TwoFactorSetupResponse.java Input port with zero implementations and zero callers; its response DTO was referenced only by that port. Kept (NOT dead): StepUpController — /api/v1/step-up/* is still called live by web-app (StepUpDeviceRegistration.tsx) and client-apps (AuthBiometricApiImpl BASE_PATH=step-up); not a duplicate of the distinct /api/v1/auth/biometric/* routes on BiometricController. Verification: mvn -B -ntp -o test green twice (1778 run, 0 fail, 67 env-gated ITs skipped).
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.
Pure removal of verified-dead code in identity-core-api. No behavior changes, no enum pruning, no config edits, no bug fixes. Each candidate was verified dead multiple ways before removal; anything with any sign of use was KEPT.
PR-only — do NOT merge before independent review.
Per-item verification
TokenGenerationAdapter.javaTokenGenerationPort;JwtServiceis@Service @Primary+ also implements port → all by-type sites resolve to JwtService; no@Qualifierto adapterRoleDomainRepository.java+RoleDomainRepositoryAdapter.javaManageRoleServiceinjectsRoleRepositoryPort, not the domain repo; nothing injectsRoleDomainRepositorySetup2FAUseCase.java+TwoFactorSetupResponse.javaSetup2FAUseCaseStepUpController.java(/api/v1/step-up/*)/step-up/*actively called by web-appfeatures/auth/components/StepUpDeviceRegistration.tsxand client-appsAuthBiometricApiImpl.kt(BASE_PATH="step-up", DI-wired NetworkModule → FingerprintRepositoryImpl). NOT a duplicate of the distinct/api/v1/auth/biometric/{devices,challenge,verify}on BiometricController.Removed files
infrastructure/adapter/TokenGenerationAdapter.javadomain/repository/RoleDomainRepository.javainfrastructure/adapter/RoleDomainRepositoryAdapter.javaapplication/port/input/Setup2FAUseCase.javaapplication/dto/response/TwoFactorSetupResponse.javaVerification & V&V
mvn -B -ntp -o compile→ BUILD SUCCESS (583 sources)mvn -B -ntp -o test→ 1778 run, 0 fail, 0 error, 67 skipped (skipped = env-gated Testcontainers ITs)