diff --git a/.blueprint/generate-sample/templates/samples/microservice-jwt.jdl b/.blueprint/generate-sample/templates/samples/microservice-jwt.jdl new file mode 100644 index 00000000..ffb21bea --- /dev/null +++ b/.blueprint/generate-sample/templates/samples/microservice-jwt.jdl @@ -0,0 +1,30 @@ +application { + config { + applicationType microservice + authenticationType jwt + baseName jhipsterSampleApplication + creationTimestamp 1617901618891 + packageName io.github.jhipster.sample + } + + entities * +} + +entity BankAccount { + name String required, + balance BigDecimal required +} +entity Label { + label String required minlength(3) +} +entity Operation { + date Instant required, + description String, + amount BigDecimal required unique +} +relationship OneToMany { + BankAccount{operation} to Operation{bankAccount(name)} +} +relationship ManyToMany { + Operation{label(label)} to Label{operation} +} diff --git a/.blueprint/generate-sample/templates/samples/microservice-oauth2.jdl b/.blueprint/generate-sample/templates/samples/microservice-oauth2.jdl new file mode 100644 index 00000000..3d8f22a9 --- /dev/null +++ b/.blueprint/generate-sample/templates/samples/microservice-oauth2.jdl @@ -0,0 +1,30 @@ +application { + config { + applicationType microservice + authenticationType oauth2 + baseName jhipsterSampleApplication + creationTimestamp 1617901618891 + packageName io.github.jhipster.sample + } + + entities * +} + +entity BankAccount { + name String required, + balance BigDecimal required +} +entity Label { + label String required minlength(3) +} +entity Operation { + date Instant required, + description String, + amount BigDecimal required unique +} +relationship OneToMany { + BankAccount{operation} to Operation{bankAccount(name)} +} +relationship ManyToMany { + Operation{label(label)} to Label{operation} +} diff --git a/.blueprint/github-build-matrix/__snapshots__/generator.spec.mjs.snap b/.blueprint/github-build-matrix/__snapshots__/generator.spec.mjs.snap index 83b1b5a5..841a89eb 100644 --- a/.blueprint/github-build-matrix/__snapshots__/generator.spec.mjs.snap +++ b/.blueprint/github-build-matrix/__snapshots__/generator.spec.mjs.snap @@ -87,6 +87,30 @@ exports[`generator - github-build-matrix > with samples > should match matrix va "sample-type": "jdl", "samples-group": "samples", }, + { + "default-environment": "prod", + "java-version": "17", + "job-name": "microservice-jwt", + "jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", + "node-version": "22.12.0", + "npm-version": "11.0.0", + "os": "ubuntu-latest", + "sample": "microservice-jwt", + "sample-type": "jdl", + "samples-group": "samples", + }, + { + "default-environment": "prod", + "java-version": "17", + "job-name": "microservice-oauth2", + "jwt-secret-key": "ZjY4MTM4YjI5YzMwZjhjYjI2OTNkNTRjMWQ5Y2Q0Y2YwOWNmZTE2NzRmYzU3NTMwM2NjOTE3MTllOTM3MWRkMzcyYTljMjVmNmQ0Y2MxOTUzODc0MDhhMTlkMDIxMzI2YzQzZDM2ZDE3MmQ3NjVkODk3OTVmYzljYTQyZDNmMTQ=", + "node-version": "22.12.0", + "npm-version": "11.0.0", + "os": "ubuntu-latest", + "sample": "microservice-oauth2", + "sample-type": "jdl", + "samples-group": "samples", + }, { "default-environment": "prod", "java-version": "17", diff --git a/.github/workflows/smoke-test-imperative.yml b/.github/workflows/smoke-test-imperative.yml index e9441760..ee5c69d1 100644 --- a/.github/workflows/smoke-test-imperative.yml +++ b/.github/workflows/smoke-test-imperative.yml @@ -38,6 +38,8 @@ jobs: - imperative-ngx-jwt-maven-mysql-redis - imperative-sql-jwt-maven-no-db - imperative-ngx-oauth2-maven-mysql-caffeine + - microservice-jwt + - microservice-oauth2 include: - app: imperative-ngx-jwt-maven-mysql-caffeine - app: imperative-ngx-jwt-maven-mongodb-caffeine @@ -45,6 +47,8 @@ jobs: - app: imperative-react-jwt-gradle-mysql-caffeine - app: imperative-ngx-jwt-maven-mysql-redis - app: imperative-ngx-oauth2-maven-mysql-caffeine + - app: microservice-jwt + - app: microservice-oauth2 exclude: - app: imperative-sql-jwt-maven-no-db - app: imperative-ngx-jwt-gradle-mongodb-redis @@ -142,7 +146,7 @@ jobs: run: npm run ci:backend:test - name: 'Run JHipster Application client tests' if: steps.compare.outputs.equals != 'true' - run: npm run ci:frontend:test + run: npm run ci:frontend:test --if-present - name: 'Packaging' if: steps.compare.outputs.equals != 'true' run: npm run ci:e2e:package diff --git a/generators/quarkus/__snapshots__/generator.spec.js.snap b/generators/quarkus/__snapshots__/generator.spec.js.snap index 10993713..5a520eb3 100644 --- a/generators/quarkus/__snapshots__/generator.spec.js.snap +++ b/generators/quarkus/__snapshots__/generator.spec.js.snap @@ -443,7 +443,7 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run > should succe } `; -exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, oauth2 and mongodb > should succeed 1`] = ` +exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gateway-jwt-gradle and mongodb > should succeed 1`] = ` { ".editorconfig": { "stateCleared": "modified", @@ -565,9 +565,6 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/docker/jhipster-control-center.yml": { "stateCleared": "modified", }, - "src/main/docker/keycloak.yml": { - "stateCleared": "modified", - }, "src/main/docker/mongodb-cluster.yml": { "stateCleared": "modified", }, @@ -586,12 +583,6 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/docker/prometheus/prometheus.yml": { "stateCleared": "modified", }, - "src/main/docker/realm-config/jhipster-realm.json": { - "stateCleared": "modified", - }, - "src/main/docker/realm-config/keycloak-health-check.sh": { - "stateCleared": "modified", - }, "src/main/docker/services.yml": { "stateCleared": "modified", }, @@ -631,37 +622,94 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/java/com/mycompany/myapp/config/package-info.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/domain/Authority.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/User.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/package-info.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/package-info.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/security/BCryptPasswordHasher.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/RandomUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/UserNotActivatedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/UsernameNotFoundException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/jwt/TokenProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/jwt/package-info.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/security/package-info.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/AuthenticationService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/EmailAlreadyUsedException.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/IdGenerator.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/InvalidPasswordException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/MailService.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/ManagementInfoService.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/service/StringIdGenerator.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/UserService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/UsernameAlreadyUsedException.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/dto/ManagementInfoDTO.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/dto/PasswordChangeDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/UserDTO.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/mapper/UserMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/mapper/package-info.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/package-info.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/AuthInfoResource.java": { + "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/JHipsterConfigurationEndpoint.java": { @@ -673,16 +721,16 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/java/com/mycompany/myapp/web/rest/JHipsterMetricsEndpoint.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/LogoutResource.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/ManagementInfoResource.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/SpaFilter.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/UserOauth2Controller.java": { + "src/main/java/com/mycompany/myapp/web/rest/UserJWTController.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/UserResource.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { @@ -691,12 +739,24 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/java/com/mycompany/myapp/web/rest/errors/ConstraintViolationExceptionMapper.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/web/rest/errors/EmailAlreadyUsedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/EmailNotFoundException.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/web/rest/errors/InvalidPasswordWebException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/LoginAlreadyUsedException.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { "stateCleared": "modified", }, @@ -709,10 +769,16 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/java/com/mycompany/myapp/web/rest/vm/EnvVM.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/web/rest/vm/KeyAndPasswordVM.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/web/rest/vm/LoggerVM.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/vm/UserVM.java": { + "src/main/java/com/mycompany/myapp/web/rest/vm/LoginVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ManagedUserVM.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { @@ -727,6 +793,9 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/java/com/mycompany/myapp/web/util/package-info.java": { "stateCleared": "modified", }, + "src/main/resources/META-INF/resources/publicKey.pem": { + "stateCleared": "modified", + }, "src/main/resources/application.properties": { "stateCleared": "modified", }, @@ -736,9 +805,24 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/resources/i18n/messages_en.properties": { "stateCleared": "modified", }, + "src/main/resources/jwt/privateKey.pem": { + "stateCleared": "modified", + }, "src/main/resources/reflect-config-mongo.json": { "stateCleared": "modified", }, + "src/main/resources/resources-config.json": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/activationEmail.html": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/creationEmail.html": { + "stateCleared": "modified", + }, + "src/main/resources/templates/mail/passwordResetEmail.html": { + "stateCleared": "modified", + }, "src/main/webapp/i18n/en/activate.json": { "stateCleared": "modified", }, @@ -784,12 +868,18 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/main/webapp/i18n/en/settings.json": { "stateCleared": "modified", }, + "src/main/webapp/i18n/en/user-management.json": { + "stateCleared": "modified", + }, "src/test/java/com/mycompany/myapp/ArchTest.java": { "stateCleared": "modified", }, "src/test/java/com/mycompany/myapp/TestUtil.java": { "stateCleared": "modified", }, + "src/test/java/com/mycompany/myapp/builder/UserBuilder.java": { + "stateCleared": "modified", + }, "src/test/java/com/mycompany/myapp/config/LocalDateProviderTest.java": { "stateCleared": "modified", }, @@ -799,13 +889,22 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/infrastructure/InjectKeycloakServer.java": { + "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/infrastructure/KeycloakServerResource.java": { + "src/test/java/com/mycompany/myapp/domain/UserTest.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/infrastructure/MockOidcServerTestResource.java": { + "src/test/java/com/mycompany/myapp/infrastructure/EmailServerResource.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/InjectMailServer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/MailServiceTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/mapper/UserMapperTest.java": { "stateCleared": "modified", }, "src/test/java/com/mycompany/myapp/utility/IntegrationTestBase.java": { @@ -817,19 +916,25 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gradle, o "src/test/java/com/mycompany/myapp/web/rest/AccountResourceTest.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/web/rest/LogoutResourceTest.java": { + "src/test/java/com/mycompany/myapp/web/rest/AuthorityResourceTest.java": { "stateCleared": "modified", }, "src/test/java/com/mycompany/myapp/web/rest/ManagementInfoResourceTest.java": { "stateCleared": "modified", }, - "src/test/resources/jhipster-realm.json": { + "src/test/java/com/mycompany/myapp/web/rest/UserJWTControllerTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/UserResourceTest.java": { + "stateCleared": "modified", + }, + "src/test/resources/i18n/messages_en.properties": { "stateCleared": "modified", }, } `; -exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oauth2 and mongodb > should succeed 1`] = ` +exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gateway-jwt-maven and mongodb > should succeed 1`] = ` { ".editorconfig": { "stateCleared": "modified", @@ -927,9 +1032,6 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/docker/jhipster-control-center.yml": { "stateCleared": "modified", }, - "src/main/docker/keycloak.yml": { - "stateCleared": "modified", - }, "src/main/docker/mongodb-cluster.yml": { "stateCleared": "modified", }, @@ -948,12 +1050,6 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/docker/prometheus/prometheus.yml": { "stateCleared": "modified", }, - "src/main/docker/realm-config/jhipster-realm.json": { - "stateCleared": "modified", - }, - "src/main/docker/realm-config/keycloak-health-check.sh": { - "stateCleared": "modified", - }, "src/main/docker/services.yml": { "stateCleared": "modified", }, @@ -993,37 +1089,94 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/java/com/mycompany/myapp/config/package-info.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/domain/Authority.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/User.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/domain/package-info.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/package-info.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/security/BCryptPasswordHasher.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/RandomUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/UserNotActivatedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/UsernameNotFoundException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/jwt/TokenProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/jwt/package-info.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/security/package-info.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/AuthenticationService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/EmailAlreadyUsedException.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/IdGenerator.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/InvalidPasswordException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/MailService.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/ManagementInfoService.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/service/StringIdGenerator.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/UserService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/UsernameAlreadyUsedException.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/dto/ManagementInfoDTO.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/dto/PasswordChangeDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/UserDTO.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/service/mapper/UserMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/mapper/package-info.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/service/package-info.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/AuthInfoResource.java": { + "src/main/java/com/mycompany/myapp/web/rest/AuthorityResource.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/JHipsterConfigurationEndpoint.java": { @@ -1035,16 +1188,16 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/java/com/mycompany/myapp/web/rest/JHipsterMetricsEndpoint.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/LogoutResource.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/web/rest/ManagementInfoResource.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/SpaFilter.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/UserOauth2Controller.java": { + "src/main/java/com/mycompany/myapp/web/rest/UserJWTController.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/UserResource.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { @@ -1053,12 +1206,24 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/java/com/mycompany/myapp/web/rest/errors/ConstraintViolationExceptionMapper.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/web/rest/errors/EmailAlreadyUsedException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/EmailNotFoundException.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/web/rest/errors/InvalidPasswordWebException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/LoginAlreadyUsedException.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { "stateCleared": "modified", }, @@ -1071,10 +1236,16 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/java/com/mycompany/myapp/web/rest/vm/EnvVM.java": { "stateCleared": "modified", }, + "src/main/java/com/mycompany/myapp/web/rest/vm/KeyAndPasswordVM.java": { + "stateCleared": "modified", + }, "src/main/java/com/mycompany/myapp/web/rest/vm/LoggerVM.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/web/rest/vm/UserVM.java": { + "src/main/java/com/mycompany/myapp/web/rest/vm/LoginVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ManagedUserVM.java": { "stateCleared": "modified", }, "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { @@ -1089,6 +1260,9 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/java/com/mycompany/myapp/web/util/package-info.java": { "stateCleared": "modified", }, + "src/main/resources/META-INF/resources/publicKey.pem": { + "stateCleared": "modified", + }, "src/main/resources/application.properties": { "stateCleared": "modified", }, @@ -1098,22 +1272,37 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/resources/i18n/messages_en.properties": { "stateCleared": "modified", }, - "src/main/resources/reflect-config-mongo.json": { + "src/main/resources/jwt/privateKey.pem": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/activate.json": { + "src/main/resources/reflect-config-mongo.json": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/configuration.json": { + "src/main/resources/resources-config.json": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/error.json": { + "src/main/resources/templates/mail/activationEmail.html": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/gateway.json": { + "src/main/resources/templates/mail/creationEmail.html": { "stateCleared": "modified", }, - "src/main/webapp/i18n/en/global.json": { + "src/main/resources/templates/mail/passwordResetEmail.html": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/configuration.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/gateway.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { "stateCleared": "modified", }, "src/main/webapp/i18n/en/health.json": { @@ -1146,12 +1335,18 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/main/webapp/i18n/en/settings.json": { "stateCleared": "modified", }, + "src/main/webapp/i18n/en/user-management.json": { + "stateCleared": "modified", + }, "src/test/java/com/mycompany/myapp/ArchTest.java": { "stateCleared": "modified", }, "src/test/java/com/mycompany/myapp/TestUtil.java": { "stateCleared": "modified", }, + "src/test/java/com/mycompany/myapp/builder/UserBuilder.java": { + "stateCleared": "modified", + }, "src/test/java/com/mycompany/myapp/config/LocalDateProviderTest.java": { "stateCleared": "modified", }, @@ -1161,13 +1356,22 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/infrastructure/InjectKeycloakServer.java": { + "src/test/java/com/mycompany/myapp/domain/AuthorityTest.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/infrastructure/KeycloakServerResource.java": { + "src/test/java/com/mycompany/myapp/domain/UserTest.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/infrastructure/MockOidcServerTestResource.java": { + "src/test/java/com/mycompany/myapp/infrastructure/EmailServerResource.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/InjectMailServer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/MailServiceTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/service/mapper/UserMapperTest.java": { "stateCleared": "modified", }, "src/test/java/com/mycompany/myapp/utility/IntegrationTestBase.java": { @@ -1179,12 +1383,1968 @@ exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with maven, oa "src/test/java/com/mycompany/myapp/web/rest/AccountResourceTest.java": { "stateCleared": "modified", }, - "src/test/java/com/mycompany/myapp/web/rest/LogoutResourceTest.java": { + "src/test/java/com/mycompany/myapp/web/rest/AuthorityResourceTest.java": { "stateCleared": "modified", }, "src/test/java/com/mycompany/myapp/web/rest/ManagementInfoResourceTest.java": { "stateCleared": "modified", }, + "src/test/java/com/mycompany/myapp/web/rest/UserJWTControllerTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/UserResourceTest.java": { + "stateCleared": "modified", + }, + "src/test/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gateway-oauth2-gradle and mongodb > should succeed 1`] = ` +{ + ".editorconfig": { + "stateCleared": "modified", + }, + ".gitattributes": { + "stateCleared": "modified", + }, + ".gitignore": { + "stateCleared": "modified", + }, + ".husky/pre-commit": { + "stateCleared": "modified", + }, + ".lintstagedrc.cjs": { + "stateCleared": "modified", + }, + ".prettierignore": { + "stateCleared": "modified", + }, + ".prettierrc": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "README.md": { + "stateCleared": "modified", + }, + "build.gradle": { + "stateCleared": "modified", + }, + "buildSrc/build.gradle": { + "stateCleared": "modified", + }, + "buildSrc/gradle/libs.versions.toml": { + "stateCleared": "modified", + }, + "checkstyle.xml": { + "stateCleared": "modified", + }, + "gradle.properties": { + "stateCleared": "modified", + }, + "gradle/docker.gradle": { + "stateCleared": "modified", + }, + "gradle/libs.versions.toml": { + "stateCleared": "modified", + }, + "gradle/profile_dev.gradle": { + "stateCleared": "modified", + }, + "gradle/profile_prod.gradle": { + "stateCleared": "modified", + }, + "gradle/sonar.gradle": { + "stateCleared": "modified", + }, + "gradle/wrapper/gradle-wrapper.jar": { + "stateCleared": "modified", + }, + "gradle/wrapper/gradle-wrapper.properties": { + "stateCleared": "modified", + }, + "gradlew": { + "stateCleared": "modified", + }, + "gradlew.bat": { + "stateCleared": "modified", + }, + "npmw": { + "stateCleared": "modified", + }, + "npmw.cmd": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "settings.gradle": { + "stateCleared": "modified", + }, + "sonar-project.properties": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.jvm": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.legacy-jar": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.native": { + "stateCleared": "modified", + }, + "src/main/docker/app.yml": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/README.md": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/application.yml": { + "stateCleared": "modified", + }, + "src/main/docker/config/git2consul.json": { + "stateCleared": "modified", + }, + "src/main/docker/consul.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/JVM.json": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/datasources/datasource.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jhipster-control-center.yml": { + "stateCleared": "modified", + }, + "src/main/docker/keycloak.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb-cluster.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/MongoDB.Dockerfile": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/scripts/init_replicaset.js": { + "stateCleared": "modified", + }, + "src/main/docker/monitoring.yml": { + "stateCleared": "modified", + }, + "src/main/docker/prometheus/prometheus.yml": { + "stateCleared": "modified", + }, + "src/main/docker/realm-config/jhipster-realm.json": { + "stateCleared": "modified", + }, + "src/main/docker/realm-config/keycloak-health-check.sh": { + "stateCleared": "modified", + }, + "src/main/docker/services.yml": { + "stateCleared": "modified", + }, + "src/main/docker/sonar.yml": { + "stateCleared": "modified", + }, + "src/main/docker/zipkin.yml": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/Constants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JHipsterProperties.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JsonbConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LocalDateProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/MongockConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/ChangeUnitsList.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/InitialSetupMigration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/IdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/ManagementInfoService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/StringIdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/ManagementInfoDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AuthInfoResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterConfigurationEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterLoggersEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterMetricsEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/LogoutResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/ManagementInfoResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/SpaFilter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/UserOauth2Controller.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ConstraintViolationExceptionMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ConfigPropsVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/EnvVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/LoggerVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/UserVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/HeaderUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/ResponseUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/package-info.java": { + "stateCleared": "modified", + }, + "src/main/resources/application.properties": { + "stateCleared": "modified", + }, + "src/main/resources/default_banner.txt": { + "stateCleared": "modified", + }, + "src/main/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/main/resources/reflect-config-mongo.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/configuration.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/gateway.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/health.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/home.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/login.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/logs.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/metrics.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/password.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/register.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/reset.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/sessions.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/settings.json": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/ArchTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TestUtil.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/LocalDateProviderTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/mock/JHipsterPropertiesMock.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/InjectKeycloakServer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/KeycloakServerResource.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/MockOidcServerTestResource.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/utility/IntegrationTestBase.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AccountResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AccountResourceTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/LogoutResourceTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/ManagementInfoResourceTest.java": { + "stateCleared": "modified", + }, + "src/test/resources/jhipster-realm.json": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with gateway-oauth2-maven and mongodb > should succeed 1`] = ` +{ + ".editorconfig": { + "stateCleared": "modified", + }, + ".gitattributes": { + "stateCleared": "modified", + }, + ".gitignore": { + "stateCleared": "modified", + }, + ".husky/pre-commit": { + "stateCleared": "modified", + }, + ".lintstagedrc.cjs": { + "stateCleared": "modified", + }, + ".mvn/jvm.config": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.jar": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.properties": { + "stateCleared": "modified", + }, + ".prettierignore": { + "stateCleared": "modified", + }, + ".prettierrc": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "README.md": { + "stateCleared": "modified", + }, + "checkstyle.xml": { + "stateCleared": "modified", + }, + "mvnw": { + "stateCleared": "modified", + }, + "mvnw.cmd": { + "stateCleared": "modified", + }, + "npmw": { + "stateCleared": "modified", + }, + "npmw.cmd": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "pom.xml": { + "stateCleared": "modified", + }, + "sonar-project.properties": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.jvm": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.legacy-jar": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.native": { + "stateCleared": "modified", + }, + "src/main/docker/app.yml": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/README.md": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/application.yml": { + "stateCleared": "modified", + }, + "src/main/docker/config/git2consul.json": { + "stateCleared": "modified", + }, + "src/main/docker/consul.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/JVM.json": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/datasources/datasource.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jhipster-control-center.yml": { + "stateCleared": "modified", + }, + "src/main/docker/keycloak.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb-cluster.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/MongoDB.Dockerfile": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/scripts/init_replicaset.js": { + "stateCleared": "modified", + }, + "src/main/docker/monitoring.yml": { + "stateCleared": "modified", + }, + "src/main/docker/prometheus/prometheus.yml": { + "stateCleared": "modified", + }, + "src/main/docker/realm-config/jhipster-realm.json": { + "stateCleared": "modified", + }, + "src/main/docker/realm-config/keycloak-health-check.sh": { + "stateCleared": "modified", + }, + "src/main/docker/services.yml": { + "stateCleared": "modified", + }, + "src/main/docker/sonar.yml": { + "stateCleared": "modified", + }, + "src/main/docker/zipkin.yml": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/Constants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JHipsterProperties.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JsonbConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LocalDateProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/MongockConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/ChangeUnitsList.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/InitialSetupMigration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/IdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/ManagementInfoService.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/StringIdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/ManagementInfoDTO.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/dto/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AccountResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/AuthInfoResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterConfigurationEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterLoggersEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterMetricsEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/LogoutResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/ManagementInfoResource.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/SpaFilter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/UserOauth2Controller.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ConstraintViolationExceptionMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ConfigPropsVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/EnvVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/LoggerVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/UserVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/HeaderUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/ResponseUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/package-info.java": { + "stateCleared": "modified", + }, + "src/main/resources/application.properties": { + "stateCleared": "modified", + }, + "src/main/resources/default_banner.txt": { + "stateCleared": "modified", + }, + "src/main/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/main/resources/reflect-config-mongo.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/configuration.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/gateway.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/health.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/home.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/login.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/logs.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/metrics.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/password.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/register.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/reset.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/sessions.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/settings.json": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/ArchTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TestUtil.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/LocalDateProviderTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/mock/JHipsterPropertiesMock.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/InjectKeycloakServer.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/KeycloakServerResource.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/MockOidcServerTestResource.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/utility/IntegrationTestBase.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AccountResourceIT.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/AccountResourceTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/LogoutResourceTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/web/rest/ManagementInfoResourceTest.java": { + "stateCleared": "modified", + }, + "src/test/resources/jhipster-realm.json": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with microservice-jwt-gradle and mongodb > should succeed 1`] = ` +{ + ".editorconfig": { + "stateCleared": "modified", + }, + ".gitattributes": { + "stateCleared": "modified", + }, + ".gitignore": { + "stateCleared": "modified", + }, + ".husky/pre-commit": { + "stateCleared": "modified", + }, + ".lintstagedrc.cjs": { + "stateCleared": "modified", + }, + ".prettierignore": { + "stateCleared": "modified", + }, + ".prettierrc": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "README.md": { + "stateCleared": "modified", + }, + "build.gradle": { + "stateCleared": "modified", + }, + "buildSrc/build.gradle": { + "stateCleared": "modified", + }, + "buildSrc/gradle/libs.versions.toml": { + "stateCleared": "modified", + }, + "checkstyle.xml": { + "stateCleared": "modified", + }, + "gradle.properties": { + "stateCleared": "modified", + }, + "gradle/docker.gradle": { + "stateCleared": "modified", + }, + "gradle/libs.versions.toml": { + "stateCleared": "modified", + }, + "gradle/profile_dev.gradle": { + "stateCleared": "modified", + }, + "gradle/profile_prod.gradle": { + "stateCleared": "modified", + }, + "gradle/sonar.gradle": { + "stateCleared": "modified", + }, + "gradle/wrapper/gradle-wrapper.jar": { + "stateCleared": "modified", + }, + "gradle/wrapper/gradle-wrapper.properties": { + "stateCleared": "modified", + }, + "gradlew": { + "stateCleared": "modified", + }, + "gradlew.bat": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "settings.gradle": { + "stateCleared": "modified", + }, + "sonar-project.properties": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.jvm": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.legacy-jar": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.native": { + "stateCleared": "modified", + }, + "src/main/docker/app.yml": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/README.md": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/application.yml": { + "stateCleared": "modified", + }, + "src/main/docker/config/git2consul.json": { + "stateCleared": "modified", + }, + "src/main/docker/consul.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/JVM.json": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/datasources/datasource.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jhipster-control-center.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb-cluster.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/MongoDB.Dockerfile": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/scripts/init_replicaset.js": { + "stateCleared": "modified", + }, + "src/main/docker/monitoring.yml": { + "stateCleared": "modified", + }, + "src/main/docker/prometheus/prometheus.yml": { + "stateCleared": "modified", + }, + "src/main/docker/services.yml": { + "stateCleared": "modified", + }, + "src/main/docker/sonar.yml": { + "stateCleared": "modified", + }, + "src/main/docker/zipkin.yml": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/Constants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JHipsterProperties.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JsonbConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LocalDateProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/jwt/TokenProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/jwt/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/IdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/StringIdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterConfigurationEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterLoggersEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterMetricsEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/SpaFilter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ConstraintViolationExceptionMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ConfigPropsVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/EnvVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/LoggerVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/HeaderUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/ResponseUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/package-info.java": { + "stateCleared": "modified", + }, + "src/main/resources/META-INF/resources/publicKey.pem": { + "stateCleared": "modified", + }, + "src/main/resources/application.properties": { + "stateCleared": "modified", + }, + "src/main/resources/default_banner.txt": { + "stateCleared": "modified", + }, + "src/main/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/main/resources/jwt/privateKey.pem": { + "stateCleared": "modified", + }, + "src/main/resources/reflect-config-mongo.json": { + "stateCleared": "modified", + }, + "src/main/resources/resources-config.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/home.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/login.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/password.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/register.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/reset.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/sessions.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/settings.json": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/ArchTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TestTokenProvider.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TestUtil.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/LocalDateProviderTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/mock/JHipsterPropertiesMock.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with microservice-jwt-maven and mongodb > should succeed 1`] = ` +{ + ".editorconfig": { + "stateCleared": "modified", + }, + ".gitattributes": { + "stateCleared": "modified", + }, + ".gitignore": { + "stateCleared": "modified", + }, + ".husky/pre-commit": { + "stateCleared": "modified", + }, + ".lintstagedrc.cjs": { + "stateCleared": "modified", + }, + ".mvn/jvm.config": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.jar": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.properties": { + "stateCleared": "modified", + }, + ".prettierignore": { + "stateCleared": "modified", + }, + ".prettierrc": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "README.md": { + "stateCleared": "modified", + }, + "checkstyle.xml": { + "stateCleared": "modified", + }, + "mvnw": { + "stateCleared": "modified", + }, + "mvnw.cmd": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "pom.xml": { + "stateCleared": "modified", + }, + "sonar-project.properties": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.jvm": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.legacy-jar": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.native": { + "stateCleared": "modified", + }, + "src/main/docker/app.yml": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/README.md": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/application.yml": { + "stateCleared": "modified", + }, + "src/main/docker/config/git2consul.json": { + "stateCleared": "modified", + }, + "src/main/docker/consul.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/JVM.json": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/datasources/datasource.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jhipster-control-center.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb-cluster.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/MongoDB.Dockerfile": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/scripts/init_replicaset.js": { + "stateCleared": "modified", + }, + "src/main/docker/monitoring.yml": { + "stateCleared": "modified", + }, + "src/main/docker/prometheus/prometheus.yml": { + "stateCleared": "modified", + }, + "src/main/docker/services.yml": { + "stateCleared": "modified", + }, + "src/main/docker/sonar.yml": { + "stateCleared": "modified", + }, + "src/main/docker/zipkin.yml": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/Constants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JHipsterProperties.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JsonbConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LocalDateProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/jwt/TokenProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/jwt/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/IdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/StringIdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterConfigurationEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterLoggersEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterMetricsEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/SpaFilter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ConstraintViolationExceptionMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ConfigPropsVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/EnvVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/LoggerVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/HeaderUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/ResponseUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/package-info.java": { + "stateCleared": "modified", + }, + "src/main/resources/META-INF/resources/publicKey.pem": { + "stateCleared": "modified", + }, + "src/main/resources/application.properties": { + "stateCleared": "modified", + }, + "src/main/resources/default_banner.txt": { + "stateCleared": "modified", + }, + "src/main/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/main/resources/jwt/privateKey.pem": { + "stateCleared": "modified", + }, + "src/main/resources/reflect-config-mongo.json": { + "stateCleared": "modified", + }, + "src/main/resources/resources-config.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/home.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/login.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/password.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/register.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/reset.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/sessions.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/settings.json": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/ArchTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TestTokenProvider.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TestUtil.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/LocalDateProviderTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/mock/JHipsterPropertiesMock.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with microservice-oauth2-gradle and mongodb > should succeed 1`] = ` +{ + ".editorconfig": { + "stateCleared": "modified", + }, + ".gitattributes": { + "stateCleared": "modified", + }, + ".gitignore": { + "stateCleared": "modified", + }, + ".husky/pre-commit": { + "stateCleared": "modified", + }, + ".lintstagedrc.cjs": { + "stateCleared": "modified", + }, + ".prettierignore": { + "stateCleared": "modified", + }, + ".prettierrc": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "README.md": { + "stateCleared": "modified", + }, + "build.gradle": { + "stateCleared": "modified", + }, + "buildSrc/build.gradle": { + "stateCleared": "modified", + }, + "buildSrc/gradle/libs.versions.toml": { + "stateCleared": "modified", + }, + "checkstyle.xml": { + "stateCleared": "modified", + }, + "gradle.properties": { + "stateCleared": "modified", + }, + "gradle/docker.gradle": { + "stateCleared": "modified", + }, + "gradle/libs.versions.toml": { + "stateCleared": "modified", + }, + "gradle/profile_dev.gradle": { + "stateCleared": "modified", + }, + "gradle/profile_prod.gradle": { + "stateCleared": "modified", + }, + "gradle/sonar.gradle": { + "stateCleared": "modified", + }, + "gradle/wrapper/gradle-wrapper.jar": { + "stateCleared": "modified", + }, + "gradle/wrapper/gradle-wrapper.properties": { + "stateCleared": "modified", + }, + "gradlew": { + "stateCleared": "modified", + }, + "gradlew.bat": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "settings.gradle": { + "stateCleared": "modified", + }, + "sonar-project.properties": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.jvm": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.legacy-jar": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.native": { + "stateCleared": "modified", + }, + "src/main/docker/app.yml": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/README.md": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/application.yml": { + "stateCleared": "modified", + }, + "src/main/docker/config/git2consul.json": { + "stateCleared": "modified", + }, + "src/main/docker/consul.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/JVM.json": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/datasources/datasource.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jhipster-control-center.yml": { + "stateCleared": "modified", + }, + "src/main/docker/keycloak.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb-cluster.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/MongoDB.Dockerfile": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/scripts/init_replicaset.js": { + "stateCleared": "modified", + }, + "src/main/docker/monitoring.yml": { + "stateCleared": "modified", + }, + "src/main/docker/prometheus/prometheus.yml": { + "stateCleared": "modified", + }, + "src/main/docker/realm-config/jhipster-realm.json": { + "stateCleared": "modified", + }, + "src/main/docker/realm-config/keycloak-health-check.sh": { + "stateCleared": "modified", + }, + "src/main/docker/services.yml": { + "stateCleared": "modified", + }, + "src/main/docker/sonar.yml": { + "stateCleared": "modified", + }, + "src/main/docker/zipkin.yml": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/Constants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JHipsterProperties.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JsonbConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LocalDateProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/MongockConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/ChangeUnitsList.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/InitialSetupMigration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/IdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/StringIdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterConfigurationEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterLoggersEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterMetricsEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/SpaFilter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ConstraintViolationExceptionMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ConfigPropsVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/EnvVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/LoggerVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/HeaderUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/ResponseUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/package-info.java": { + "stateCleared": "modified", + }, + "src/main/resources/application.properties": { + "stateCleared": "modified", + }, + "src/main/resources/default_banner.txt": { + "stateCleared": "modified", + }, + "src/main/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/main/resources/reflect-config-mongo.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/home.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/login.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/password.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/register.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/reset.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/sessions.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/settings.json": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/ArchTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TestUtil.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/LocalDateProviderTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/mock/JHipsterPropertiesMock.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/MockOidcServerTestResource.java": { + "stateCleared": "modified", + }, + "src/test/resources/jhipster-realm.json": { + "stateCleared": "modified", + }, +} +`; + +exports[`SubGenerator quarkus of quarkus JHipster blueprint > run with microservice-oauth2-maven and mongodb > should succeed 1`] = ` +{ + ".editorconfig": { + "stateCleared": "modified", + }, + ".gitattributes": { + "stateCleared": "modified", + }, + ".gitignore": { + "stateCleared": "modified", + }, + ".husky/pre-commit": { + "stateCleared": "modified", + }, + ".lintstagedrc.cjs": { + "stateCleared": "modified", + }, + ".mvn/jvm.config": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.jar": { + "stateCleared": "modified", + }, + ".mvn/wrapper/maven-wrapper.properties": { + "stateCleared": "modified", + }, + ".prettierignore": { + "stateCleared": "modified", + }, + ".prettierrc": { + "stateCleared": "modified", + }, + ".yo-rc.json": { + "stateCleared": "modified", + }, + "README.md": { + "stateCleared": "modified", + }, + "checkstyle.xml": { + "stateCleared": "modified", + }, + "mvnw": { + "stateCleared": "modified", + }, + "mvnw.cmd": { + "stateCleared": "modified", + }, + "package.json": { + "stateCleared": "modified", + }, + "pom.xml": { + "stateCleared": "modified", + }, + "sonar-project.properties": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.jvm": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.legacy-jar": { + "stateCleared": "modified", + }, + "src/main/docker/Dockerfile.native": { + "stateCleared": "modified", + }, + "src/main/docker/app.yml": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/README.md": { + "stateCleared": "modified", + }, + "src/main/docker/central-server-config/application.yml": { + "stateCleared": "modified", + }, + "src/main/docker/config/git2consul.json": { + "stateCleared": "modified", + }, + "src/main/docker/consul.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/JVM.json": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/dashboards/dashboard.yml": { + "stateCleared": "modified", + }, + "src/main/docker/grafana/provisioning/datasources/datasource.yml": { + "stateCleared": "modified", + }, + "src/main/docker/jhipster-control-center.yml": { + "stateCleared": "modified", + }, + "src/main/docker/keycloak.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb-cluster.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb.yml": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/MongoDB.Dockerfile": { + "stateCleared": "modified", + }, + "src/main/docker/mongodb/scripts/init_replicaset.js": { + "stateCleared": "modified", + }, + "src/main/docker/monitoring.yml": { + "stateCleared": "modified", + }, + "src/main/docker/prometheus/prometheus.yml": { + "stateCleared": "modified", + }, + "src/main/docker/realm-config/jhipster-realm.json": { + "stateCleared": "modified", + }, + "src/main/docker/realm-config/keycloak-health-check.sh": { + "stateCleared": "modified", + }, + "src/main/docker/services.yml": { + "stateCleared": "modified", + }, + "src/main/docker/sonar.yml": { + "stateCleared": "modified", + }, + "src/main/docker/zipkin.yml": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/GeneratedByJHipster.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/Constants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JHipsterProperties.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/JsonbConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/LocalDateProvider.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/MongockConfiguration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/ChangeUnitsList.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/InitialSetupMigration.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/dbmigrations/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/config/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/AuthoritiesConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/security/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/IdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/StringIdGenerator.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/service/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterConfigurationEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterLoggersEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/JHipsterMetricsEndpoint.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/SpaFilter.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/BadRequestAlertException.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ConstraintViolationExceptionMapper.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/ErrorConstants.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/FieldErrorVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/errors/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/ConfigPropsVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/EnvVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/LoggerVM.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/rest/vm/package-info.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/HeaderUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/ResponseUtil.java": { + "stateCleared": "modified", + }, + "src/main/java/com/mycompany/myapp/web/util/package-info.java": { + "stateCleared": "modified", + }, + "src/main/resources/application.properties": { + "stateCleared": "modified", + }, + "src/main/resources/default_banner.txt": { + "stateCleared": "modified", + }, + "src/main/resources/i18n/messages_en.properties": { + "stateCleared": "modified", + }, + "src/main/resources/reflect-config-mongo.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/activate.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/error.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/global.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/home.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/login.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/password.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/register.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/reset.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/sessions.json": { + "stateCleared": "modified", + }, + "src/main/webapp/i18n/en/settings.json": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/ArchTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/TestUtil.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/LocalDateProviderTest.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/config/mock/JHipsterPropertiesMock.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/domain/AssertUtils.java": { + "stateCleared": "modified", + }, + "src/test/java/com/mycompany/myapp/infrastructure/MockOidcServerTestResource.java": { + "stateCleared": "modified", + }, "src/test/resources/jhipster-realm.json": { "stateCleared": "modified", }, diff --git a/generators/quarkus/files.js b/generators/quarkus/files.js index 1f2ca5d1..230b4c02 100644 --- a/generators/quarkus/files.js +++ b/generators/quarkus/files.js @@ -29,11 +29,11 @@ export const serverFiles = { templates: ['README.md.jhi.quarkus', 'checkstyle.xml'], }, { - condition: generator => generator.buildTool === 'maven', + condition: generator => generator.buildToolMaven, templates: ['pom.xml'], }, { - condition: generator => generator.buildTool === 'gradle', + condition: generator => generator.buildToolGradle, templates: [ 'build.gradle', 'settings.gradle', @@ -55,40 +55,18 @@ export const serverFiles = { templates: ['application.properties'], }), javaMainResourceTemplatesBlock({ - condition: generator => generator.authenticationType === 'jwt', + condition: generator => generator.authenticationTypeJwt, templates: [ { file: 'jwt/privateKey.pem', method: 'copy', noEjs: true }, { file: 'META-INF/resources/publicKey.pem', method: 'copy', noEjs: true }, 'resources-config.json', ], }), - javaMainResourceTemplatesBlock({ - condition: generator => generator.databaseType === 'mongodb', - templates: ['reflect-config-mongo.json'], - }), - javaMainResourceTemplatesBlock({ - condition: generator => !generator.skipUserManagement, - templates: [ - 'templates/mail/activationEmail.html', - 'templates/mail/creationEmail.html', - 'templates/mail/passwordResetEmail.html', - ], - }), ], serverTestSupport: [ javaTestPackageTemplatesBlock({ templates: ['ArchTest.java', 'TestUtil.java'], }), - javaTestPackageTemplatesBlock({ - condition: generator => generator.authenticationType === 'oauth2', - templates: [ - 'infrastructure/MockOidcServerTestResource.java', - 'infrastructure/KeycloakServerResource.java', - 'infrastructure/InjectKeycloakServer.java', - 'utility/IntegrationTestBase_oauth2.java', - 'web/rest/AccountResourceIT_oauth2.java', - ], - }), ], serverJavaCache: [ javaMainPackageTemplatesBlock({ @@ -100,7 +78,7 @@ export const serverFiles = { templates: ['cache/redis/RedisCache.java'], }), javaMainPackageTemplatesBlock({ - condition: generator => generator.cacheProvider === 'redis' && generator.authenticationType === 'jwt', + condition: generator => generator.cacheProvider === 'redis' && generator.authenticationTypeJwt, templates: ['cache/redis/UserRedisCache.java'], }), javaTestPackageTemplatesBlock({ @@ -117,70 +95,71 @@ export const serverFiles = { 'config/LocalDateProvider.java', ], }), + javaTestPackageTemplatesBlock({ + templates: ['config/mock/JHipsterPropertiesMock.java', 'config/LocalDateProviderTest.java'], + }), + ], + databaseConfig: [ javaMainPackageTemplatesBlock({ - condition: generator => generator.databaseType === 'sql', + condition: generator => generator.databaseTypeSql, templates: [ 'config/hibernate/JHipsterCompatibleImplicitNamingStrategy.java', 'config/hibernate/JHipsterCompatiblePhysicalNamingStrategy.java', ], }), javaMainPackageTemplatesBlock({ - condition: generator => - generator.databaseType === 'mongodb' && - (!generator.skipUserManagement || (generator.skipUserManagement && generator.authenticationType === 'oauth2')), + condition: ctx => ctx.databaseTypeMongodb, + templates: ['service/IdGenerator.java', 'service/StringIdGenerator.java'], + }), + javaMainPackageTemplatesBlock({ + condition: ctx => ctx.databaseTypeMongodb && (ctx.generateUserManagement || ctx.authenticationTypeOauth2), templates: [ 'config/dbmigrations/InitialSetupMigration.java', 'config/dbmigrations/ChangeUnitsList.java', 'config/MongockConfiguration.java', ], }), - javaTestPackageTemplatesBlock({ - templates: ['config/mock/JHipsterPropertiesMock.java', 'config/LocalDateProviderTest.java'], + javaMainResourceTemplatesBlock({ + condition: ctx => ctx.databaseTypeMongodb, + templates: ['reflect-config-mongo.json'], }), ], - serverJavaDomain: [ + userEntity: [ javaMainPackageTemplatesBlock({ - condition: generator => !generator.skipUserManagement, - templates: ['domain/Authority.java', 'domain/User.java'], + condition: generator => generator.generateBuiltInUserEntity, + templates: [ + 'domain/User.java', + 'service/mapper/UserMapper.java', + 'service/dto/UserDTO.java', + 'service/UserService.java', + 'web/rest/UserResource.java', + ], }), javaTestPackageTemplatesBlock({ - condition: generator => !generator.skipUserManagement, - templates: ['domain/AuthorityTest.java', 'domain/UserTest.java'], - }), - ], - serverJavaSecurity: [ - javaMainPackageTemplatesBlock({ - condition: generator => generator.authenticationType === 'jwt', - templates: ['security/jwt/TokenProvider.java'], - }), - javaMainPackageTemplatesBlock({ - condition: generator => !generator.skipUserManagement, + condition: generator => generator.generateBuiltInUserEntity, templates: [ - 'security/BCryptPasswordHasher.java', - 'security/UsernameNotFoundException.java', - 'security/UserNotActivatedException.java', - 'security/RandomUtil.java', + 'domain/UserTest.java', + 'web/rest/UserResourceTest.java', + 'service/mapper/UserMapperTest.java', + 'domain/UserTest.java', ], }), - javaMainPackageTemplatesBlock({ - templates: ['security/AuthoritiesConstants.java'], - }), ], - serverJavaService: [ + authorityEntity: [ javaMainPackageTemplatesBlock({ - templates: ['service/dto/ManagementInfoDTO.java', 'service/ManagementInfoService.java'], + condition: generator => generator.generateBuiltInAuthorityEntity, + templates: ['domain/Authority.java', 'web/rest/AuthorityResource.java'], }), - javaMainPackageTemplatesBlock({ - condition: generator => generator.databaseType === 'mongodb', - templates: ['service/IdGenerator.java', 'service/StringIdGenerator.java'], + javaTestPackageTemplatesBlock({ + condition: generator => generator.generateBuiltInAuthorityEntity, + templates: ['domain/AuthorityTest.java', 'web/rest/AuthorityResourceTest.java'], }), - + ], + userManagement: [ javaMainPackageTemplatesBlock({ - condition: generator => !generator.skipUserManagement, + condition: ctx => ctx.generateUserManagement, templates: [ - 'service/mapper/UserMapper.java', 'service/dto/PasswordChangeDTO.java', - 'service/dto/UserDTO.java', 'service/dto/ManagementInfoDTO.java', 'service/AuthenticationService.java', 'service/EmailAlreadyUsedException.java', @@ -188,13 +167,45 @@ export const serverFiles = { 'service/MailService.java', 'service/ManagementInfoService.java', 'service/UsernameAlreadyUsedException.java', - 'service/UserService.java', - 'service/MailService.java', + 'security/BCryptPasswordHasher.java', + 'security/UsernameNotFoundException.java', + 'security/UserNotActivatedException.java', + 'security/RandomUtil.java', + 'web/rest/vm/KeyAndPasswordVM.java', + 'web/rest/vm/LoginVM.java', + 'web/rest/vm/ManagedUserVM.java', + 'web/rest/errors/EmailAlreadyUsedException.java', + 'web/rest/errors/EmailNotFoundException.java', + 'web/rest/errors/LoginAlreadyUsedException.java', + 'web/rest/errors/InvalidPasswordWebException.java', ], }), + javaMainPackageTemplatesBlock({ + condition: ctx => ctx.authenticationTypeJwt && ctx.generateUserManagement, + templates: ['security/RandomUtil.java'], + }), javaTestPackageTemplatesBlock({ - condition: generator => !generator.skipUserManagement, - templates: ['service/MailServiceTest.java', 'service/mapper/UserMapperTest.java', 'domain/UserTest.java'], + condition: ctx => ctx.generateUserManagement, + templates: ['service/MailServiceTest.java'], + }), + javaMainResourceTemplatesBlock({ + condition: ctx => ctx.generateUserManagement, + templates: [ + 'templates/mail/activationEmail.html', + 'templates/mail/creationEmail.html', + 'templates/mail/passwordResetEmail.html', + ], + }), + ], + security: [ + javaMainPackageTemplatesBlock({ + templates: ['security/AuthoritiesConstants.java'], + }), + ], + serverJavaService: [ + javaMainPackageTemplatesBlock({ + condition: ctx => ctx.generateAuthenticationApi, + templates: ['service/dto/ManagementInfoDTO.java', 'service/ManagementInfoService.java'], }), ], serverJavaWebRestError: [ @@ -206,23 +217,36 @@ export const serverFiles = { 'web/rest/errors/FieldErrorVM.java', ], }), + ], + authenticationApi: [ javaMainPackageTemplatesBlock({ - condition: generator => !generator.skipUserManagement, - templates: [ - 'web/rest/errors/EmailAlreadyUsedException.java', - 'web/rest/errors/EmailNotFoundException.java', - 'web/rest/errors/LoginAlreadyUsedException.java', - 'web/rest/errors/InvalidPasswordWebException.java', - ], + condition: ctx => ctx.generateAuthenticationApi, + templates: ['web/rest/AccountResource.java'], + }), + javaMainPackageTemplatesBlock({ + condition: generator => generator.generateAuthenticationApi, + templates: ['web/rest/ManagementInfoResource.java'], + }), + javaTestPackageTemplatesBlock({ + condition: generator => generator.generateAuthenticationApi, + templates: ['web/rest/ManagementInfoResourceTest.java'], }), ], - serverJavaWeb: [ + jwt: [ javaMainPackageTemplatesBlock({ - condition: generator => generator.databaseType !== 'no', - templates: ['web/rest/AccountResource.java'], + condition: ctx => ctx.authenticationTypeJwt, + templates: ['security/jwt/TokenProvider.java'], + }), + javaMainPackageTemplatesBlock({ + condition: ctx => ctx.authenticationTypeJwt && ctx.generateUserManagement, + templates: ['web/rest/UserJWTController.java'], }), javaTestPackageTemplatesBlock({ - condition: generator => generator.databaseType !== 'no' && generator.authenticationType === 'jwt', + condition: ctx => ctx.authenticationTypeJwt && !ctx.generateUserManagement, + templates: ['TestTokenProvider.java'], + }), + javaTestPackageTemplatesBlock({ + condition: ctx => ctx.authenticationTypeJwt && ctx.generateUserManagement, templates: [ 'web/rest/AccountResourceTest_jwt.java', 'builder/UserBuilder.java', @@ -230,63 +254,52 @@ export const serverFiles = { 'infrastructure/InjectMailServer.java', 'utility/IntegrationTestBase.java', 'web/rest/AccountResourceIT.java', + 'web/rest/UserJWTControllerTest.java', ], }), - javaTestPackageTemplatesBlock({ - condition: generator => generator.authenticationType === 'oauth2', - templates: ['web/rest/AccountResourceTest_oauth2.java', 'web/rest/LogoutResourceTest.java'], - }), + ], + oauth2: [ javaMainPackageTemplatesBlock({ + condition: ctx => ctx.authenticationTypeOauth2 && ctx.generateAuthenticationApi, templates: [ - 'web/rest/ManagementInfoResource.java', - 'web/rest/JHipsterMetricsEndpoint.java', - 'web/rest/JHipsterConfigurationEndpoint.java', - 'web/rest/vm/ConfigPropsVM.java', - 'web/rest/vm/EnvVM.java', - 'web/util/HeaderUtil.java', - 'web/util/ResponseUtil.java', - 'web/rest/JHipsterLoggersEndpoint.java', - 'web/rest/vm/LoggerVM.java', + 'web/rest/vm/UserVM.java', + 'web/rest/AuthInfoResource.java', + 'web/rest/LogoutResource.java', + 'web/rest/UserOauth2Controller.java', ], }), javaTestPackageTemplatesBlock({ - templates: ['web/rest/ManagementInfoResourceTest.java'], - }), - javaMainPackageTemplatesBlock({ - condition: generator => generator.authenticationType === 'jwt' && generator.databaseType !== 'no', - templates: ['web/rest/UserJWTController.java'], + condition: ctx => ctx.authenticationTypeOauth2, + templates: ['infrastructure/MockOidcServerTestResource.java'], }), javaTestPackageTemplatesBlock({ - condition: generator => generator.authenticationType === 'jwt' && generator.databaseType !== 'no', - templates: ['web/rest/UserJWTControllerTest.java'], - }), - javaMainPackageTemplatesBlock({ - condition: generator => generator.authenticationType === 'oauth2', + condition: ctx => ctx.authenticationTypeOauth2 && ctx.generateAuthenticationApi, templates: [ - 'web/rest/vm/UserVM.java', - 'web/rest/AuthInfoResource.java', - 'web/rest/LogoutResource.java', - 'web/rest/UserOauth2Controller.java', + 'web/rest/AccountResourceTest_oauth2.java', + 'web/rest/AccountResourceIT_oauth2.java', + 'web/rest/LogoutResourceTest.java', + 'infrastructure/KeycloakServerResource.java', + 'infrastructure/InjectKeycloakServer.java', + 'utility/IntegrationTestBase_oauth2.java', ], }), + ], + serverJavaWeb: [ javaMainPackageTemplatesBlock({ - condition: generator => !generator.skipUserManagement, templates: [ - 'web/rest/vm/KeyAndPasswordVM.java', - 'web/rest/vm/LoginVM.java', - 'web/rest/vm/ManagedUserVM.java', - 'web/rest/ManagementInfoResource.java', - 'web/rest/UserResource.java', - 'web/rest/AuthorityResource.java', + 'web/rest/JHipsterMetricsEndpoint.java', + 'web/rest/JHipsterConfigurationEndpoint.java', + 'web/rest/vm/ConfigPropsVM.java', + 'web/rest/vm/EnvVM.java', + 'web/util/HeaderUtil.java', + 'web/util/ResponseUtil.java', + 'web/rest/JHipsterLoggersEndpoint.java', + 'web/rest/vm/LoggerVM.java', ], }), javaMainPackageTemplatesBlock({ condition: generator => !generator.skipClient, templates: ['web/rest/SpaFilter.java'], }), - javaTestPackageTemplatesBlock({ - condition: generator => !generator.skipUserManagement, - templates: ['web/rest/UserResourceTest.java', 'web/rest/AuthorityResourceTest.java'], - }), ], }; diff --git a/generators/quarkus/generator.spec.js b/generators/quarkus/generator.spec.js index 3ec02e5b..ad6aa968 100644 --- a/generators/quarkus/generator.spec.js +++ b/generators/quarkus/generator.spec.js @@ -24,14 +24,14 @@ describe('SubGenerator quarkus of quarkus JHipster blueprint', () => { }); }); - Object.entries(fromMatrix({ buildTool: ['maven', 'gradle'] })).forEach(([name, config]) => { - describe(`run with ${name}, oauth2 and mongodb`, () => { + Object.entries( + fromMatrix({ applicationType: ['gateway', 'microservice'], authenticationType: ['jwt', 'oauth2'], buildTool: ['maven', 'gradle'] }), + ).forEach(([name, config]) => { + describe(`run with ${name} and mongodb`, () => { beforeAll(async function () { await helpers .run(SUB_GENERATOR_NAMESPACE) .withJHipsterConfig({ - applicationType: 'gateway', - authenticationType: 'oauth2', databaseType: 'mongodb', ...config, }) diff --git a/generators/quarkus/templates/src/test/java/_package_/ArchTest.java.ejs b/generators/quarkus/templates/src/test/java/_package_/ArchTest.java.ejs index b5b67af8..53f649f8 100644 --- a/generators/quarkus/templates/src/test/java/_package_/ArchTest.java.ejs +++ b/generators/quarkus/templates/src/test/java/_package_/ArchTest.java.ejs @@ -42,6 +42,9 @@ class ArchTest { .dependOnClassesThat() .resideInAnyPackage("..<%=packageName%>.web..") .because("Services and repositories should not depend on web layer") +<%_ if (!generateBuiltInUserEntity && !generateBuiltInAuthorityEntity) { _%> + .allowEmptyShould(true) +<%_ } _%> .check(importedClasses); } } diff --git a/generators/quarkus/templates/src/test/java/_package_/TestTokenProvider.java.ejs b/generators/quarkus/templates/src/test/java/_package_/TestTokenProvider.java.ejs new file mode 100644 index 00000000..01af9a49 --- /dev/null +++ b/generators/quarkus/templates/src/test/java/_package_/TestTokenProvider.java.ejs @@ -0,0 +1,47 @@ +<%# + Copyright 2020-2025 the original author or authors from the JHipster project. + + This file is part of the JHipster project, see https://www.jhipster.tech/ + for more information. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +-%> +package <%=packageName%>; + +import java.util.Set; + +import io.github.jhipster.sample.security.jwt.TokenProvider; +import io.quarkus.security.runtime.QuarkusPrincipal; +import io.quarkus.security.runtime.QuarkusSecurityIdentity; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + +@ApplicationScoped +public class TestTokenProvider { + + @Inject + TokenProvider tokenProvider; + + public String getAdminToken() { + var identity = createQuarkusSecurityIdentity("admin", "admin", Set.of("ROLE_ADMIN")); + return tokenProvider.createToken(identity, false); + } + + private QuarkusSecurityIdentity createQuarkusSecurityIdentity(String login, String password, Set authorities) { + QuarkusSecurityIdentity.Builder builder = QuarkusSecurityIdentity.builder(); + builder.setPrincipal(new QuarkusPrincipal(login)); + builder.addCredential(new io.quarkus.security.credential.PasswordCredential(password.toCharArray())); + builder.addRoles(authorities); + return builder.build(); + } +} diff --git a/generators/quarkus/templates/src/test/java/_package_/TestUtil.java.ejs b/generators/quarkus/templates/src/test/java/_package_/TestUtil.java.ejs index e0fe0cc4..e8ef6ffc 100644 --- a/generators/quarkus/templates/src/test/java/_package_/TestUtil.java.ejs +++ b/generators/quarkus/templates/src/test/java/_package_/TestUtil.java.ejs @@ -19,7 +19,7 @@ package <%=packageName%>; import static <%=packageName%>.config.Constants.DATE_TIME_FORMAT; -<%_ if(!skipUserManagement) { _%> +<%_ if(generateUserManagement) { _%> import static io.restassured.RestAssured.given; import static jakarta.ws.rs.core.Response.Status.OK; import static org.hamcrest.Matchers.*; @@ -80,7 +80,7 @@ public final class TestUtil { // HashCodes are equals because the objects are not persisted yet assertThat(domainObject1.hashCode()).isEqualTo(domainObject2.hashCode()); } -<%_ if(!skipUserManagement) { _%> +<%_ if (generateUserManagement) { _%> public static String getAdminToken() { return getToken("admin", "admin"); diff --git a/generators/quarkus/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceTest.java.ejs b/generators/quarkus/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceTest.java.ejs index bb4bbbc6..35842330 100644 --- a/generators/quarkus/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceTest.java.ejs +++ b/generators/quarkus/templates/src/test/java/_package_/_entityPackage_/web/rest/_entityClass_ResourceTest.java.ejs @@ -18,6 +18,9 @@ -%> package <%=packageName%>.web.rest; +<%_ if (authenticationTypeJwt && !generateUserManagement) { _%> +import <%=packageName%>.TestTokenProvider; +<%_ } _%> <%- include('../../_partials/imports', this); -%> @QuarkusTest @@ -38,11 +41,17 @@ public class <%= entityClass%>ResourceTest { String adminToken; <%= restClass %> <%= restInstance %>; +<%_ if (authenticationTypeJwt && !generateUserManagement) { _%> + @Inject + TestTokenProvider tokenProvider; +<%_ } _%> <%_ if (databaseType === 'sql') { _%> + @Inject LiquibaseFactory liquibaseFactory; <%_ } else if (databaseType === 'mongodb') { _%> + @Inject MongoClient mongoClient; @@ -58,7 +67,11 @@ public class <%= entityClass%>ResourceTest { @BeforeEach public void authenticateAdmin() { +<%_ if (authenticationTypeJwt && !generateUserManagement) { _%> + this.adminToken = tokenProvider.getAdminToken(); +<%_ } else { _%> this.adminToken = TestUtil.getAdminToken(); +<%_ } _%> } <%_ if (databaseType === 'sql') { _%> diff --git a/generators/server/command.js b/generators/server/command.js index ac2d02b1..64344f70 100644 --- a/generators/server/command.js +++ b/generators/server/command.js @@ -3,6 +3,5 @@ import { asCommand } from 'generator-jhipster'; export default asCommand({ configs: {}, options: {}, - override: true, import: ['jhipster-quarkus:quarkus'], });