diff --git a/generators/server/files.js b/generators/server/files.js index f25b2d8f..ff6e5cb9 100644 --- a/generators/server/files.js +++ b/generators/server/files.js @@ -433,11 +433,6 @@ const serverFiles = { { path: SERVER_MAIN_SRC_DIR, templates: [ - { - file: 'package/security/ApiLogoutController.java', - renameTo: generator => `${generator.javaDir}security/ApiLogoutController.java`, - useBluePrint: true - }, { file: 'package/security/AuthoritiesConstants.java', renameTo: generator => `${generator.javaDir}security/AuthoritiesConstants.java`, @@ -453,16 +448,6 @@ const serverFiles = { renameTo: generator => `${generator.javaDir}security/DatabaseAuthenticationProvider.java`, useBluePrint: true }, - { - file: 'package/security/JHipsterOpenIdUserDetailsMapper.java', - renameTo: generator => `${generator.javaDir}security/JHipsterOpenIdUserDetailsMapper.java`, - useBluePrint: true - }, - { - file: 'package/security/KeycloakEndSessionEndpoint.java', - renameTo: generator => `${generator.javaDir}security/KeycloakEndSessionEndpoint.java`, - useBluePrint: true - }, { file: 'package/security/Logout.java', renameTo: generator => `${generator.javaDir}security/Logout.java`, @@ -489,6 +474,27 @@ const serverFiles = { useBluePrint: true } ] + }, + { + condition: generator => generator.authenticationType === 'oauth2', + path: SERVER_MAIN_SRC_DIR, + templates: [ + { + file: 'package/security/ApiLogoutController.java', + renameTo: generator => `${generator.javaDir}security/ApiLogoutController.java`, + useBluePrint: true + }, + { + file: 'package/security/JHipsterOpenIdUserDetailsMapper.java', + renameTo: generator => `${generator.javaDir}security/JHipsterOpenIdUserDetailsMapper.java`, + useBluePrint: true + }, + { + file: 'package/security/KeycloakEndSessionEndpoint.java', + renameTo: generator => `${generator.javaDir}security/KeycloakEndSessionEndpoint.java`, + useBluePrint: true + } + ] } ], serverJavaService: [