diff --git a/generators/server/__snapshots__/generator.spec.js.snap b/generators/server/__snapshots__/generator.spec.js.snap index e8dd7cb3f427..45d21d555a06 100644 --- a/generators/server/__snapshots__/generator.spec.js.snap +++ b/generators/server/__snapshots__/generator.spec.js.snap @@ -319,9 +319,6 @@ exports[`generator - server composing databaseType option no with oauth2 should "src/main/java/com/mycompany/myapp/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_imperative.java.ejs b/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_imperative.java.ejs index 9b83d3627225..5fa690b4919b 100644 --- a/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_imperative.java.ejs +++ b/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_imperative.java.ejs @@ -67,6 +67,8 @@ import static org.springframework.security.oauth2.core.oidc.StandardClaimNames.P import <%= packageName %>.security.oauth2.AudienceValidator; import <%= packageName %>.security.SecurityUtils; +import org.springframework.core.convert.converter.Converter; +import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.oauth2.client.userinfo.OAuth2UserService; import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest; import org.springframework.security.oauth2.client.oidc.userinfo.OidcUserService; @@ -75,6 +77,7 @@ import org.springframework.security.oauth2.core.OAuth2TokenValidator; import org.springframework.security.oauth2.core.oidc.user.DefaultOidcUser; import org.springframework.security.oauth2.core.oidc.user.OidcUser; import org.springframework.security.oauth2.jwt.*; +import org.springframework.security.oauth2.server.resource.authentication.JwtAuthenticationConverter; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.core.GrantedAuthority; <%_ if (!applicationTypeMicroservice) { _%> @@ -284,7 +287,9 @@ public class SecurityConfiguration { <%_ } else { _%> .sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) <%_ } _%> - .oauth2ResourceServer(oauth2 -> oauth2.jwt(withDefaults())) + .oauth2ResourceServer(oauth2 -> oauth2 + .jwt(jwt -> jwt + .jwtAuthenticationConverter(authenticationConverter()))) .oauth2Client(withDefaults()); <%_ } _%> <%_ if (devDatabaseTypeH2Any) { _%> @@ -305,6 +310,21 @@ public class SecurityConfiguration { } <%_ if (authenticationTypeOauth2) { _%> + Converter authenticationConverter() { + JwtAuthenticationConverter jwtAuthenticationConverter = new JwtAuthenticationConverter(); + jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter( + new Converter>() { + @Override + public Collection convert(Jwt jwt) { + return SecurityUtils.extractAuthorityFromClaims(jwt.getClaims()); + } + } + ); + jwtAuthenticationConverter.setPrincipalClaimName(PREFERRED_USERNAME); + return jwtAuthenticationConverter; + } + <%_ if (!applicationTypeMicroservice) { _%> + OAuth2UserService oidcUserService() { final OidcUserService delegate = new OidcUserService(); @@ -313,7 +333,6 @@ public class SecurityConfiguration { return new DefaultOidcUser(oidcUser.getAuthorities(), oidcUser.getIdToken(), oidcUser.getUserInfo(), PREFERRED_USERNAME); }; } - <%_ if (!applicationTypeMicroservice) { _%> /** * Map authorities from "groups" or "roles" claim in ID Token. diff --git a/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_reactive.java.ejs b/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_reactive.java.ejs index 486011bc7b87..62fb00751d52 100644 --- a/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_reactive.java.ejs +++ b/generators/server/templates/src/main/java/_package_/config/SecurityConfiguration_reactive.java.ejs @@ -24,7 +24,10 @@ import static org.springframework.security.oauth2.core.oidc.StandardClaimNames.P import <%= packageName %>.security.SecurityUtils; import <%= packageName %>.security.oauth2.AudienceValidator; +import org.springframework.security.authentication.AbstractAuthenticationToken; +import org.springframework.security.oauth2.server.resource.authentication.ReactiveJwtAuthenticationConverter; import org.springframework.beans.factory.annotation.Value; +import reactor.core.publisher.Flux; <%_ } _%> <%_ if (authenticationUsesCsrf) { _%> import tech.jhipster.web.filter.reactive.CookieCsrfFilter; @@ -39,6 +42,7 @@ import <%= packageName %>.web.filter.SpaWebFilter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; <%_ if (authenticationTypeOauth2) { _%> +import org.springframework.core.convert.converter.Converter; <%_ if (!applicationTypeMicroservice) { _%> import org.springframework.core.ParameterizedTypeReference; <%_ } _%> @@ -303,7 +307,9 @@ public class SecurityConfiguration { .oauth2Login(oauth2 -> oauth2.authorizationRequestResolver(authorizationRequestResolver(this.clientRegistrationRepository))) <%_ } _%> .oauth2Client(withDefaults()) - .oauth2ResourceServer(oauth2 -> oauth2.jwt(withDefaults())); + .oauth2ResourceServer(oauth2 -> oauth2 + .jwt(jwt -> jwt + .jwtAuthenticationConverter(jwtAuthenticationConverter()))); <%_ } else if (authenticationTypeJwt) { _%> .httpBasic(basic -> basic.disable()) .oauth2ResourceServer(oauth2 -> oauth2.jwt(withDefaults())); @@ -331,6 +337,20 @@ public class SecurityConfiguration { } <%_ } _%> + Converter> jwtAuthenticationConverter() { + ReactiveJwtAuthenticationConverter jwtAuthenticationConverter = new ReactiveJwtAuthenticationConverter(); + jwtAuthenticationConverter.setJwtGrantedAuthoritiesConverter( + new Converter>() { + @Override + public Flux convert(Jwt jwt) { + return Flux.fromIterable(SecurityUtils.extractAuthorityFromClaims(jwt.getClaims())); + } + } + ); + jwtAuthenticationConverter.setPrincipalClaimName(PREFERRED_USERNAME); + return jwtAuthenticationConverter; + } + /** * Map authorities from "groups" or "roles" claim in ID Token. * diff --git a/generators/server/templates/src/main/java/_package_/security/oauth2/JwtGrantedAuthorityConverter.java.ejs b/generators/server/templates/src/main/java/_package_/security/oauth2/JwtGrantedAuthorityConverter.java.ejs deleted file mode 100644 index e19b4c4026ac..000000000000 --- a/generators/server/templates/src/main/java/_package_/security/oauth2/JwtGrantedAuthorityConverter.java.ejs +++ /dev/null @@ -1,40 +0,0 @@ -<%# - Copyright 2013-2024 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 - - https://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 %>.security.oauth2; - -import <%= packageName %>.security.SecurityUtils; -import org.springframework.core.convert.converter.Converter; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.oauth2.jwt.Jwt; -import org.springframework.stereotype.Component; - -import java.util.Collection; - -@Component -public class JwtGrantedAuthorityConverter implements Converter> { - - public JwtGrantedAuthorityConverter() { - // Bean extracting authority. - } - - @Override - public Collection convert(Jwt jwt) { - return SecurityUtils.extractAuthorityFromClaims(jwt.getClaims()); - } -} diff --git a/generators/server/templates/src/main/resources/config/application.yml.ejs b/generators/server/templates/src/main/resources/config/application.yml.ejs index bab8a0c0618b..47fa2531e8ec 100644 --- a/generators/server/templates/src/main/resources/config/application.yml.ejs +++ b/generators/server/templates/src/main/resources/config/application.yml.ejs @@ -358,9 +358,6 @@ spring: client-secret: web_app <%_ } _%> scope: openid, profile, email, offline_access # last one for refresh tokens - resourceserver: - jwt: - principal-claim-name: preferred_username <%_ } _%> <%_ if (authenticationTypeJwt) { _%> oauth2: diff --git a/generators/spring-boot/__snapshots__/generator.spec.ts.snap b/generators/spring-boot/__snapshots__/generator.spec.ts.snap index c236029ef722..bd7eab354bcc 100644 --- a/generators/spring-boot/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-boot/__snapshots__/generator.spec.ts.snap @@ -463,9 +463,6 @@ exports[`generator - spring-boot with oauth2 should match generated files snapsh "src/main/java/com/mycompany/myapp/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/myapp/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/myapp/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-boot/cleanup.ts b/generators/spring-boot/cleanup.ts index 4e48ef58794e..e65e9d56688e 100644 --- a/generators/spring-boot/cleanup.ts +++ b/generators/spring-boot/cleanup.ts @@ -26,7 +26,7 @@ import cleanupOauth2 from './cleanup-oauth2.js'; * need to be removed. */ export default asWritingTask(function cleanupTask(this, taskParam) { - const { application } = taskParam; + const { application, control } = taskParam; if (application.authenticationTypeOauth2) { cleanupOauth2.call(this, taskParam); } @@ -208,4 +208,8 @@ export default asWritingTask(function cleanupTask(this, taskParam) { if (this.isJhipsterVersionLessThan('8.4.0')) { this.removeFile(`${application.javaPackageSrcDir}config/LocaleConfiguration.java`); } + + control.cleanupFiles({ + '8.6.1': [[application.authenticationTypeOauth2!, `${application.javaPackageSrcDir}security/oauth2/JwtGrantedAuthorityConverter.java`]], + }); }); diff --git a/generators/spring-boot/files.ts b/generators/spring-boot/files.ts index 679d93d998ce..c30c1838b75f 100644 --- a/generators/spring-boot/files.ts +++ b/generators/spring-boot/files.ts @@ -64,7 +64,7 @@ const oauth2Files = { { path: `${SERVER_MAIN_SRC_DIR}_package_/`, renameTo: moveToJavaPackageSrcDir, - templates: ['security/oauth2/AudienceValidator.java', 'security/oauth2/JwtGrantedAuthorityConverter.java'], + templates: ['security/oauth2/AudienceValidator.java'], }, { path: `${SERVER_TEST_SRC_DIR}_package_/`, diff --git a/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap b/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap index fe7cf88ebd37..6c8e9c2af925 100644 --- a/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-cassandra/__snapshots__/generator.spec.ts.snap @@ -1271,9 +1271,6 @@ exports[`generator - cassandra microservice-oauth2-reactive(true)-gradle-enableT "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2426,9 +2423,6 @@ exports[`generator - cassandra monolith-oauth2-reactive(false)-maven-enableTrans "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2794,9 +2788,6 @@ exports[`generator - cassandra monolith-oauth2-reactive(true)-gradle-enableTrans "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap b/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap index 2a7c82268895..c56fa03dfecc 100644 --- a/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-couchbase/__snapshots__/generator.spec.ts.snap @@ -1316,9 +1316,6 @@ exports[`generator - couchbase microservice-oauth2-reactive(true)-gradle-enableT "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2507,9 +2504,6 @@ exports[`generator - couchbase monolith-oauth2-reactive(false)-maven-enableTrans "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2872,9 +2866,6 @@ exports[`generator - couchbase monolith-oauth2-reactive(true)-gradle-enableTrans "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap index 65e17dd353d3..d60b89762c7f 100644 --- a/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-elasticsearch/__snapshots__/generator.spec.ts.snap @@ -1424,9 +1424,6 @@ exports[`generator - elasticsearch microservice-oauth2-reactive(true)-gradle-ena "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2729,9 +2726,6 @@ exports[`generator - elasticsearch monolith-oauth2-reactive(false)-maven-enableT "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -3160,9 +3154,6 @@ exports[`generator - elasticsearch monolith-oauth2-reactive(true)-gradle-enableT "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap b/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap index 6c9302c8cf6f..478f7404b4ef 100644 --- a/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-mongodb/__snapshots__/generator.spec.ts.snap @@ -1253,9 +1253,6 @@ exports[`generator - mongodb microservice-oauth2-reactive(true)-gradle-enableTra "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2390,9 +2387,6 @@ exports[`generator - mongodb monolith-oauth2-reactive(false)-maven-enableTransla "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2743,9 +2737,6 @@ exports[`generator - mongodb monolith-oauth2-reactive(true)-gradle-enableTransla "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap b/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap index 298aa3ef41bd..2624cec22893 100644 --- a/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-neo4j/__snapshots__/generator.spec.ts.snap @@ -1256,9 +1256,6 @@ exports[`generator - neo4j microservice-oauth2-reactive(true)-gradle-enableTrans "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2393,9 +2390,6 @@ exports[`generator - neo4j monolith-oauth2-reactive(false)-maven-enableTranslati "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -2746,9 +2740,6 @@ exports[`generator - neo4j monolith-oauth2-reactive(true)-gradle-enableTranslati "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap b/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap index a9255229381b..19111e643025 100644 --- a/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap +++ b/generators/spring-data-relational/__snapshots__/generator.spec.ts.snap @@ -1424,9 +1424,6 @@ exports[`generator - sql gateway-oauth2-mariadb-gradle-enableTranslation(true)-c "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -1789,9 +1786,6 @@ exports[`generator - sql gateway-oauth2-mssql-gradle-enableTranslation(true)-com "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -4183,9 +4177,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(false)-maven-enabl "src/main/java/tech/jhipster/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -4452,9 +4443,6 @@ exports[`generator - sql microservice-oauth2-mariadb-reactive(true)-gradle-enabl "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -4682,9 +4670,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(false)-maven-enableT "src/main/java/tech/jhipster/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -4951,9 +4936,6 @@ exports[`generator - sql microservice-oauth2-mssql-reactive(true)-gradle-enableT "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -5202,9 +5184,6 @@ exports[`generator - sql microservice-oauth2-mysql-reactive(true)-gradle-enableT "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -5459,9 +5438,6 @@ exports[`generator - sql microservice-oauth2-oracle-reactive(true)-gradle-enable "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -5713,9 +5689,6 @@ exports[`generator - sql microservice-oauth2-postgresql-reactive(true)-gradle-en "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -9464,9 +9437,6 @@ exports[`generator - sql monolith-oauth2-mariadb-reactive(false)-maven-enableTra "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -9769,9 +9739,6 @@ exports[`generator - sql monolith-oauth2-mariadb-reactive(true)-gradle-enableTra "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -10029,9 +9996,6 @@ exports[`generator - sql monolith-oauth2-mssql-reactive(false)-maven-enableTrans "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -10328,9 +10292,6 @@ exports[`generator - sql monolith-oauth2-mssql-reactive(true)-gradle-enableTrans "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -10600,9 +10561,6 @@ exports[`generator - sql monolith-oauth2-mysql-reactive(false)-maven-enableTrans "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -10905,9 +10863,6 @@ exports[`generator - sql monolith-oauth2-mysql-reactive(true)-gradle-enableTrans "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -11174,9 +11129,6 @@ exports[`generator - sql monolith-oauth2-oracle-reactive(false)-maven-enableTran "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -11476,9 +11428,6 @@ exports[`generator - sql monolith-oauth2-oracle-reactive(true)-gradle-enableTran "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -11733,9 +11682,6 @@ exports[`generator - sql monolith-oauth2-postgresql-reactive(false)-maven-enable "src/main/java/tech/jhipster/security/oauth2/CustomClaimConverter.java": { "stateCleared": "modified", }, - "src/main/java/tech/jhipster/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/tech/jhipster/security/oauth2/package-info.java": { "stateCleared": "modified", }, @@ -12032,9 +11978,6 @@ exports[`generator - sql monolith-oauth2-postgresql-reactive(true)-gradle-enable "src/main/java/com/mycompany/security/oauth2/AudienceValidator.java": { "stateCleared": "modified", }, - "src/main/java/com/mycompany/security/oauth2/JwtGrantedAuthorityConverter.java": { - "stateCleared": "modified", - }, "src/main/java/com/mycompany/security/oauth2/package-info.java": { "stateCleared": "modified", }, diff --git a/test-integration/jdl-samples/ms-mf-ng-consul-oauth2-neo4j/blog-store.jdl b/test-integration/jdl-samples/ms-mf-ng-consul-oauth2-neo4j/blog-store.jdl index 55f7821b43b6..a634044b1721 100644 --- a/test-integration/jdl-samples/ms-mf-ng-consul-oauth2-neo4j/blog-store.jdl +++ b/test-integration/jdl-samples/ms-mf-ng-consul-oauth2-neo4j/blog-store.jdl @@ -137,6 +137,7 @@ relationship OneToOne { */ @ChangelogDate(20210408164814) +@AdminEntity entity Notification { title String required } diff --git a/test-integration/jdl-samples/ms-ng-oauth2-mongodb-caffeine/blog-store.jdl b/test-integration/jdl-samples/ms-ng-oauth2-mongodb-caffeine/blog-store.jdl index 04c96f7aa186..796b02cac13a 100644 --- a/test-integration/jdl-samples/ms-ng-oauth2-mongodb-caffeine/blog-store.jdl +++ b/test-integration/jdl-samples/ms-ng-oauth2-mongodb-caffeine/blog-store.jdl @@ -132,6 +132,7 @@ entity Product { } @ChangelogDate(20210408164814) +@AdminEntity entity Notification { title String required }