This is an automated email from the ASF dual-hosted git repository. Aman-Mittal pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/fineract-consumer-facing.git
commit 089ee71207705b0298c872ee7682da313904bc98 Merge: 01e6676 acb5be3 Author: Aman-Mittal <[email protected]> AuthorDate: Sun Jun 14 22:09:30 2026 +0530 Merge pull request #16 from edk12564/main FINERACT-2641: Implement Authentication Feature .github/workflows/build-tests-backend.yml | 3 + .github/workflows/build-tests-frontend.yml | 4 + consumer/.gitignore | 3 + consumer/build.gradle | 2 +- consumer/compose.yaml | 3 + .../generate-dev-jwt-key.sh} | 59 ++- .../api/AuthenticationCommandController.java | 134 +++++++ .../command/data/AuthenticationConstants.java} | 12 +- .../data/EstablishedSessionCommandData.java} | 18 +- .../command/data/LoginChallengeCommandData.java} | 17 +- .../command/data/LoginCommand.java} | 11 +- .../command/data/LoginCommandRequest.java} | 15 +- .../command/data/LogoutCommand.java} | 12 +- .../command/data/RefreshSessionCommand.java} | 12 +- .../command/data/SessionCommandData.java} | 18 +- .../command/data/VerifyTwoFactorCommand.java} | 13 +- .../data/VerifyTwoFactorCommandRequest.java} | 15 +- .../command/domain/RefreshToken.java | 84 +++++ .../exception/InvalidCredentialsException.java} | 10 +- .../exception/RefreshTokenInvalidException.java} | 10 +- .../exception/TwoFactorInvalidException.java} | 16 +- .../repository/RefreshTokenCommandRepository.java} | 15 +- .../service/AuthenticationCommandService.java | 38 ++ .../service/AuthenticationCommandServiceImpl.java | 228 ++++++++++++ .../consumer/infrastructure/command/Command.java | 3 +- .../configs/AuthenticationConfig.java} | 12 +- .../configs/AuthenticationProperties.java} | 20 +- .../consumer/infrastructure/configs/JwtConfig.java | 132 +++++++ .../configs/JwtProperties.java} | 18 +- .../configs/PasswordEncoderConfig.java} | 18 +- .../infrastructure/configs/SecurityConfig.java | 15 +- .../jwt/IssuedJwt.java} | 14 +- .../jwt/JwtClaims.java} | 12 +- .../consumer/infrastructure/jwt/JwtIssuer.java | 58 +++ .../consumer/infrastructure/query/Query.java | 3 +- .../web/ConsumerHeaders.java} | 12 +- ...{OtpDeliveryMethod.java => OtpDestination.java} | 4 +- .../consumer/otp/command/data/OtpMetadata.java | 2 +- .../consumer/otp/command/data/PendingOtp.java | 4 +- ...on.java => OtpDestinationInvalidException.java} | 4 +- .../otp/command/service/OtpCommandService.java | 4 +- .../otp/command/service/OtpCommandServiceImpl.java | 18 +- .../command/api/RegistrationCommandController.java | 6 +- .../command/data/SubmitRegistrationCommand.java | 2 +- .../data/SubmitRegistrationCommandRequest.java | 7 + .../service/RegistrationCommandServiceImpl.java | 14 +- .../user/command/data/CreateUserCommand.java | 4 +- .../consumer/user/command/domain/User.java | 18 +- .../consumer/user/command/domain/UserStatus.java | 1 - .../user/command/service/UserCommandService.java | 2 - .../command/service/UserCommandServiceImpl.java | 12 +- .../query/data/UserCredentialsQueryData.java} | 16 +- .../user/query/repository/UserQueryRepository.java | 15 + .../user/query/service/UserQueryService.java | 6 + .../user/query/service/UserQueryServiceImpl.java | 15 + consumer/src/main/resources/application.properties | 12 + .../changelog/changes/001-create-users-table.yaml | 12 +- ...s-table.yaml => 002-create-refresh-tokens.yaml} | 52 ++- .../db/changelog/db.changelog-master.yaml | 2 + .../command/domain/RefreshTokenTest.java | 78 ++++ .../AuthenticationCommandServiceImplTest.java | 409 +++++++++++++++++++++ .../cucumber/clients/AuthenticationClient.java | 98 +++++ .../MailpitClient.java} | 27 +- .../cucumber/helpers/RegistrationHelper.java | 77 ++++ .../cucumber/hooks/ConsumerDatabaseReset.java | 46 +++ .../consumer/cucumber/steps/LoginSteps.java | 297 +++++++++++++++ .../consumer/cucumber/steps/RegistrationSteps.java | 45 ++- .../consumer/infrastructure/jwt/JwtIssuerTest.java | 137 +++++++ .../consumer/user/command/domain/UserTest.java | 73 ++++ .../service/UserCommandServiceImplTest.java | 156 ++++++++ .../query/service/UserQueryServiceImplTest.java | 113 ++++++ consumer/src/test/resources/features/login.feature | 65 ++++ .../test/resources/features/registration.feature | 14 +- 73 files changed, 2643 insertions(+), 293 deletions(-)
