@cerema/cadriciel 1.4.24 → 1.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1358) hide show
  1. package/aqtion/.cadriciel/.settings +25 -0
  2. package/aqtion/.cadriciel/bin/.settings +0 -0
  3. package/aqtion/.cadriciel/bin/build.js +106 -0
  4. package/aqtion/.cadriciel/bin/env.js +145 -0
  5. package/aqtion/.cadriciel/bin/gen/api/api.js +886 -0
  6. package/aqtion/.cadriciel/bin/gen/component/component.js +36 -0
  7. package/aqtion/.cadriciel/bin/gen/db/db.js +3 -0
  8. package/aqtion/.cadriciel/bin/gen/db/ext/create.js +124 -0
  9. package/aqtion/.cadriciel/bin/gen/db/ext/ext.js +91 -0
  10. package/aqtion/.cadriciel/bin/gen/db/ext/import.js +636 -0
  11. package/aqtion/.cadriciel/bin/gen/db/ext/models.js +843 -0
  12. package/aqtion/.cadriciel/bin/gen/db/ext/query.js +127 -0
  13. package/aqtion/.cadriciel/bin/gen/db/ext/reverse.js +201 -0
  14. package/aqtion/.cadriciel/bin/gen/db/ext/reverse_lib.js +253 -0
  15. package/aqtion/.cadriciel/bin/gen/db/ext/snapshot.js +112 -0
  16. package/aqtion/.cadriciel/bin/gen/db/ext/sql.js +380 -0
  17. package/aqtion/.cadriciel/bin/gen/page/page.js +163 -0
  18. package/aqtion/.cadriciel/bin/gen/project/project.js +220 -0
  19. package/aqtion/.cadriciel/bin/gen/service/service.js +18 -0
  20. package/aqtion/.cadriciel/bin/gen.js +19 -0
  21. package/aqtion/.cadriciel/bin/lib/cadriciel.js +91 -0
  22. package/aqtion/.cadriciel/bin/lib/convert.js +94 -0
  23. package/aqtion/.cadriciel/bin/lib/docker.js +63 -0
  24. package/aqtion/.cadriciel/bin/lib/global.js +140 -0
  25. package/aqtion/.cadriciel/bin/lib/templates.js +48 -0
  26. package/aqtion/.cadriciel/bin/lib/utils.js +268 -0
  27. package/aqtion/.cadriciel/bin/link.js +139 -0
  28. package/aqtion/.cadriciel/bin/logs.js +42 -0
  29. package/aqtion/.cadriciel/bin/project/_update.js +268 -0
  30. package/aqtion/.cadriciel/bin/project/ext/logo.js +109 -0
  31. package/aqtion/.cadriciel/bin/project/ext/version.js +267 -0
  32. package/aqtion/.cadriciel/bin/project/update.js +3 -0
  33. package/aqtion/.cadriciel/bin/project.js +12 -0
  34. package/aqtion/.cadriciel/bin/reset.js +73 -0
  35. package/aqtion/.cadriciel/bin/rm/api/api.js +244 -0
  36. package/aqtion/.cadriciel/bin/rm/component/component.js +16 -0
  37. package/aqtion/.cadriciel/bin/rm/db/db.js +3 -0
  38. package/aqtion/.cadriciel/bin/rm/db/ext/ext.js +60 -0
  39. package/aqtion/.cadriciel/bin/rm/db/ext/models.js +357 -0
  40. package/aqtion/.cadriciel/bin/rm/page/page.js +62 -0
  41. package/aqtion/.cadriciel/bin/rm/service/service.js +17 -0
  42. package/aqtion/.cadriciel/bin/rm.js +18 -0
  43. package/aqtion/.cadriciel/bin/run/backend.js +122 -0
  44. package/aqtion/.cadriciel/bin/run/frontend.js +52 -0
  45. package/aqtion/.cadriciel/bin/run/stop-backend.js +39 -0
  46. package/aqtion/.cadriciel/bin/run/stop-frontend.js +55 -0
  47. package/aqtion/.cadriciel/bin/start/docker.js +448 -0
  48. package/aqtion/.cadriciel/bin/start/update.js +120 -0
  49. package/aqtion/.cadriciel/bin/start/workspace.js +398 -0
  50. package/aqtion/.cadriciel/bin/start.js +29 -0
  51. package/aqtion/.cadriciel/bin/stop/docker.js +28 -0
  52. package/aqtion/.cadriciel/bin/stop/workspace.js +54 -0
  53. package/aqtion/.cadriciel/bin/stop.js +26 -0
  54. package/aqtion/.cadriciel/bin/templates/angular-prod/main.module.ts +43 -0
  55. package/aqtion/.cadriciel/bin/templates/angular-prod/shared.module.ts +10 -0
  56. package/aqtion/.cadriciel/bin/templates/components/{{name}}.component.html +1 -0
  57. package/aqtion/.cadriciel/bin/templates/components/{{name}}.component.scss +0 -0
  58. package/aqtion/.cadriciel/bin/templates/components/{{name}}.component.ts +15 -0
  59. package/aqtion/.cadriciel/bin/templates/environment.tpl.ts +12 -0
  60. package/aqtion/.cadriciel/bin/templates/idea/compiler.xml +28 -0
  61. package/aqtion/.cadriciel/bin/templates/idea/dataSources.local.xml +20 -0
  62. package/aqtion/.cadriciel/bin/templates/idea/dataSources.xml +12 -0
  63. package/aqtion/.cadriciel/bin/templates/idea/encodings.xml +12 -0
  64. package/aqtion/.cadriciel/bin/templates/idea/jarRepositories.xml +20 -0
  65. package/aqtion/.cadriciel/bin/templates/idea/jpa-buddy-datasource.xml +8 -0
  66. package/aqtion/.cadriciel/bin/templates/idea/jpa-buddy.xml +7 -0
  67. package/aqtion/.cadriciel/bin/templates/idea/misc.xml +16 -0
  68. package/aqtion/.cadriciel/bin/templates/idea/modules.xml +8 -0
  69. package/aqtion/.cadriciel/bin/templates/idea/vcs.xml +6 -0
  70. package/aqtion/.cadriciel/bin/templates/idea/workspace-docker.xml +114 -0
  71. package/aqtion/.cadriciel/bin/templates/idea/workspace.xml +122 -0
  72. package/aqtion/.cadriciel/bin/templates/java/config.java +59 -0
  73. package/aqtion/.cadriciel/bin/templates/jpb/jpb-settings.xml +12 -0
  74. package/aqtion/.cadriciel/bin/templates/routing.module.ts +30 -0
  75. package/aqtion/.cadriciel/bin/templates/start/backend.sh +15 -0
  76. package/aqtion/.cadriciel/bin/templates/start/frontend.sh +3 -0
  77. package/aqtion/.cadriciel/bin/templates/studio-env.tpl.ts +9 -0
  78. package/aqtion/.cadriciel/bin/templates/{{name}}.component.html +1 -0
  79. package/aqtion/.cadriciel/bin/templates/{{name}}.component.scss +0 -0
  80. package/aqtion/.cadriciel/bin/templates/{{name}}.component.ts +16 -0
  81. package/aqtion/.cadriciel/bin/templates/{{name}}.service.ts +20 -0
  82. package/aqtion/.cadriciel/bin/unlink.js +0 -0
  83. package/aqtion/.cadriciel/bin/upgrade.js +0 -0
  84. package/aqtion/.cadriciel/bin/version.json +4 -0
  85. package/aqtion/.cadriciel/cli/build.js +8 -0
  86. package/aqtion/.cadriciel/cli/env.js +9 -0
  87. package/aqtion/.cadriciel/cli/gen.js +34 -0
  88. package/aqtion/.cadriciel/cli/link.js +8 -0
  89. package/aqtion/.cadriciel/cli/logs.js +8 -0
  90. package/aqtion/.cadriciel/cli/project.js +14 -0
  91. package/aqtion/.cadriciel/cli/reset.js +8 -0
  92. package/aqtion/.cadriciel/cli/restart.js +8 -0
  93. package/aqtion/.cadriciel/cli/rm.js +34 -0
  94. package/aqtion/.cadriciel/cli/start.js +8 -0
  95. package/aqtion/.cadriciel/cli/stop.js +8 -0
  96. package/aqtion/.cadriciel/cli/unlink.js +8 -0
  97. package/aqtion/.cadriciel/cli/upgrade.js +8 -0
  98. package/aqtion/.cadriciel/routes/root.json +1 -0
  99. package/aqtion/.cadriciel/shared/.gitkeep +0 -0
  100. package/aqtion/.cadriciel/watcher/pid +1 -0
  101. package/aqtion/.dockerignore +5 -0
  102. package/aqtion/.gitlab-ci.yml +102 -0
  103. package/aqtion/.jpb/jpb-settings.xml +12 -0
  104. package/aqtion/.project +1 -0
  105. package/aqtion/.vscode/launch.json +23 -0
  106. package/aqtion/.vscode/settings.json +3 -0
  107. package/aqtion/.vscode/tasks.json +55 -0
  108. package/aqtion/Dockerfile +8 -0
  109. package/aqtion/angular.json +208 -0
  110. package/aqtion/backend/.mvn/wrapper/MavenWrapperDownloader.java +116 -0
  111. package/aqtion/backend/.mvn/wrapper/maven-wrapper.properties +4 -0
  112. package/aqtion/backend/Dockerfile +13 -0
  113. package/aqtion/backend/aqtion-data/Readme.md +27 -0
  114. package/aqtion/backend/aqtion-data/pom.xml +36 -0
  115. package/aqtion/backend/aqtion-data/src/main/resources/db/dev/Readme.md +5 -0
  116. package/aqtion/backend/aqtion-data/src/main/resources/db/dev/V2022.06.02.1513__dev-data.sql +7 -0
  117. package/aqtion/backend/aqtion-data/src/main/resources/db/migration/Readme.md +38 -0
  118. package/aqtion/backend/aqtion-data/src/main/resources/db/migration/V2021.10.14.0819__Init.sql +23 -0
  119. package/aqtion/backend/aqtion-data/target/classes/db/dev/Readme.md +5 -0
  120. package/aqtion/backend/aqtion-data/target/classes/db/dev/V2022.06.02.1513__dev-data.sql +7 -0
  121. package/aqtion/backend/aqtion-data/target/classes/db/migration/Readme.md +38 -0
  122. package/aqtion/backend/aqtion-data/target/classes/db/migration/V2021.10.14.0819__Init.sql +23 -0
  123. package/aqtion/backend/aqtion-data/target/maven-archiver/pom.properties +3 -0
  124. package/aqtion/backend/aqtion-metier/pom.xml +110 -0
  125. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/aqtion/services/CustomUserDetailsService.java +12 -0
  126. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/aqtion/services/ProfilService.java +24 -0
  127. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/aqtion/services/UserService.java +36 -0
  128. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/aqtion/services/impl/CustomUserDetailsServiceImpl.java +79 -0
  129. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/aqtion/services/impl/ProfilServiceImpl.java +27 -0
  130. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/aqtion/services/impl/UserServiceImpl.java +75 -0
  131. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/commons/security/UserSecurityServiceUtil.java +30 -0
  132. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/commons/services/GenericService.java +30 -0
  133. package/aqtion/backend/aqtion-metier/src/main/java/fr/cerema/dsi/commons/services/GenericServiceImpl.java +62 -0
  134. package/aqtion/backend/aqtion-metier/src/test/java/fr/cerema/dsi/aqtion/services/UserServiceImplTest.java +60 -0
  135. package/aqtion/backend/aqtion-metier/target/maven-archiver/pom.properties +3 -0
  136. package/aqtion/backend/aqtion-metier/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +9 -0
  137. package/aqtion/backend/aqtion-metier/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +9 -0
  138. package/aqtion/backend/aqtion-metier/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +1 -0
  139. package/aqtion/backend/aqtion-metier/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +1 -0
  140. package/aqtion/backend/aqtion-persistance/pom.xml +33 -0
  141. package/aqtion/backend/aqtion-persistance/src/main/java/fr/cerema/dsi/aqtion/repositories/ProfilRepository.java +18 -0
  142. package/aqtion/backend/aqtion-persistance/src/main/java/fr/cerema/dsi/aqtion/repositories/UserRepository.java +28 -0
  143. package/aqtion/backend/aqtion-persistance/src/main/java/fr/cerema/dsi/commons/repositories/AbstractDao.java +118 -0
  144. package/aqtion/backend/aqtion-persistance/src/main/java/fr/cerema/dsi/commons/repositories/GenericRepository.java +101 -0
  145. package/aqtion/backend/aqtion-persistance/src/main/java/fr/cerema/dsi/commons/repositories/IAbstractDao.java +66 -0
  146. package/aqtion/backend/aqtion-persistance/target/maven-archiver/pom.properties +3 -0
  147. package/aqtion/backend/aqtion-persistance/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +5 -0
  148. package/aqtion/backend/aqtion-persistance/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +5 -0
  149. package/aqtion/backend/aqtion-presentation/Readme.md +98 -0
  150. package/aqtion/backend/aqtion-presentation/pom.xml +185 -0
  151. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/App.java +20 -0
  152. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/config/AspectJConfiguration.java +58 -0
  153. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/config/AuthenticationTokenFilter.java +134 -0
  154. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/config/SecurityConfiguration.java +80 -0
  155. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/config/StaticResourcesWebConfiguration.java +41 -0
  156. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/config/WebConfiguration.java +59 -0
  157. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/controllers/AccountController.java +64 -0
  158. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/controllers/ApiOpenController.java +71 -0
  159. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/controllers/UserController.java +65 -0
  160. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/dto/GenericDTO.java +20 -0
  161. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/dto/ProfilDTO.java +26 -0
  162. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/dto/UserDTO.java +57 -0
  163. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/dto/UserWithCurrentAuthorityDTO.java +31 -0
  164. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/aqtion/mapper/UserMapper.java +33 -0
  165. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/beans/errors/ApiSubError.java +5 -0
  166. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/beans/errors/ApiValidationSubError.java +13 -0
  167. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/beans/errors/JsonApiError.java +308 -0
  168. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/controllers/AbstractErrorHandler.java +67 -0
  169. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/controllers/ClientForwardController.java +19 -0
  170. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/controllers/CustomErrorController.java +57 -0
  171. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/controllers/RestResponseEntityExceptionHandler.java +75 -0
  172. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/security/auth/jwt/exceptions/InvalidTokenException.java +30 -0
  173. package/aqtion/backend/aqtion-presentation/src/main/java/fr/cerema/dsi/commons/security/filters/AppCorsFilter.java +45 -0
  174. package/aqtion/backend/aqtion-presentation/src/main/resources/META-INF/spring.factories +2 -0
  175. package/aqtion/backend/aqtion-presentation/src/main/resources/banner.txt +3 -0
  176. package/aqtion/backend/aqtion-presentation/src/main/resources/logback-spring-ci.xml +15 -0
  177. package/aqtion/backend/aqtion-presentation/src/main/resources/logback-spring.xml +15 -0
  178. package/aqtion/backend/aqtion-presentation/src/main/resources-filtered/application-prod.yml +80 -0
  179. package/aqtion/backend/aqtion-presentation/src/main/resources-filtered/application.yml +94 -0
  180. package/aqtion/backend/aqtion-presentation/src/test/java/fr/cerema/dsi/aqtion/service/IntegrationTest.java +18 -0
  181. package/aqtion/backend/aqtion-presentation/src/test/resources/application.yml +41 -0
  182. package/aqtion/backend/aqtion-presentation/src/test/resources/db.migration/Readme.md +6 -0
  183. package/aqtion/backend/aqtion-presentation/target/generated-sources/annotations/fr/cerema/dsi/aqtion/mapper/UserMapperImpl.java +134 -0
  184. package/aqtion/backend/aqtion-presentation/target/maven-archiver/pom.properties +3 -0
  185. package/aqtion/backend/aqtion-presentation/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +25 -0
  186. package/aqtion/backend/aqtion-presentation/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +23 -0
  187. package/aqtion/backend/aqtion-presentation/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +1 -0
  188. package/aqtion/backend/aqtion-presentation/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +1 -0
  189. package/aqtion/backend/aqtion-transverse/pom.xml +22 -0
  190. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/aqtion/entities/Profil.java +53 -0
  191. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/aqtion/entities/User.java +79 -0
  192. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/aqtion/enums/Role.java +8 -0
  193. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/aqtion/exceptions/JwtConfMalformedException.java +9 -0
  194. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/aqtion/exceptions/security/AuthenticationServiceException.java +30 -0
  195. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/aqtion/exceptions/security/NoRoleForUserServiceException.java +29 -0
  196. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/aqtion/exceptions/security/UserNotFoundServiceException.java +29 -0
  197. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/commons/entities/GenericEntity.java +43 -0
  198. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/commons/exceptions/BadRequestException.java +43 -0
  199. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/commons/exceptions/EntityNotFoundException.java +9 -0
  200. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/commons/exceptions/GenericRepositoryException.java +29 -0
  201. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/commons/exceptions/GenericServiceException.java +29 -0
  202. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/commons/exceptions/UserNotFoundException.java +11 -0
  203. package/aqtion/backend/aqtion-transverse/src/main/java/fr/cerema/dsi/commons/exceptions/UtilsException.java +13 -0
  204. package/aqtion/backend/aqtion-transverse/target/maven-archiver/pom.properties +3 -0
  205. package/aqtion/backend/aqtion-transverse/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +15 -0
  206. package/aqtion/backend/aqtion-transverse/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +14 -0
  207. package/aqtion/backend/mvnw +311 -0
  208. package/aqtion/backend/mvnw.cmd +182 -0
  209. package/aqtion/backend/pom.xml +144 -0
  210. package/aqtion/banner.png +0 -0
  211. package/aqtion/bun.lockb +0 -0
  212. package/aqtion/docker/config/keycloak/realms/export/realm.json +63 -0
  213. package/aqtion/docker/config/keycloak/themes/README.txt +3 -0
  214. package/aqtion/docker/config/keycloak/themes/base/account/account.ftl +70 -0
  215. package/aqtion/docker/config/keycloak/themes/base/account/applications.ftl +76 -0
  216. package/aqtion/docker/config/keycloak/themes/base/account/federatedIdentity.ftl +42 -0
  217. package/aqtion/docker/config/keycloak/themes/base/account/log.ftl +35 -0
  218. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_ca.properties +147 -0
  219. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_cs.properties +171 -0
  220. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_da.properties +339 -0
  221. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_de.properties +353 -0
  222. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_en.properties +397 -0
  223. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_es.properties +147 -0
  224. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_fi.properties +400 -0
  225. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_fr.properties +180 -0
  226. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_hu.properties +334 -0
  227. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_it.properties +336 -0
  228. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_ja.properties +335 -0
  229. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_lt.properties +154 -0
  230. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_lv.properties +197 -0
  231. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_nl.properties +133 -0
  232. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_no.properties +152 -0
  233. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_pl.properties +248 -0
  234. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_pt_BR.properties +356 -0
  235. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_ru.properties +155 -0
  236. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_sk.properties +196 -0
  237. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_sv.properties +150 -0
  238. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_tr.properties +315 -0
  239. package/aqtion/docker/config/keycloak/themes/base/account/messages/messages_zh_CN.properties +153 -0
  240. package/aqtion/docker/config/keycloak/themes/base/account/password.ftl +59 -0
  241. package/aqtion/docker/config/keycloak/themes/base/account/resource-detail.ftl +277 -0
  242. package/aqtion/docker/config/keycloak/themes/base/account/resources.ftl +403 -0
  243. package/aqtion/docker/config/keycloak/themes/base/account/sessions.ftl +44 -0
  244. package/aqtion/docker/config/keycloak/themes/base/account/template.ftl +88 -0
  245. package/aqtion/docker/config/keycloak/themes/base/account/theme.properties +1 -0
  246. package/aqtion/docker/config/keycloak/themes/base/account/totp.ftl +141 -0
  247. package/aqtion/docker/config/keycloak/themes/base/admin/index.ftl +99 -0
  248. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_ca.properties +477 -0
  249. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_de.properties +1627 -0
  250. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_en.properties +2030 -0
  251. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_es.properties +479 -0
  252. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_fi.properties +1 -0
  253. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_fr.properties +155 -0
  254. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_it.properties +0 -0
  255. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_ja.properties +1641 -0
  256. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_lt.properties +1221 -0
  257. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_lv.properties +1 -0
  258. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_nl.properties +0 -0
  259. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_no.properties +1129 -0
  260. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_pl.properties +1 -0
  261. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_pt_BR.properties +1101 -0
  262. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_ru.properties +1279 -0
  263. package/aqtion/docker/config/keycloak/themes/base/admin/messages/admin-messages_zh_CN.properties +1230 -0
  264. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_ca.properties +8 -0
  265. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_de.properties +29 -0
  266. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_en.properties +67 -0
  267. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_es.properties +8 -0
  268. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_fi.properties +1 -0
  269. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_fr.properties +8 -0
  270. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_it.properties +0 -0
  271. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_ja.properties +30 -0
  272. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_lt.properties +25 -0
  273. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_lv.properties +1 -0
  274. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_nl.properties +27 -0
  275. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_no.properties +14 -0
  276. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_pl.properties +1 -0
  277. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_pt_BR.properties +18 -0
  278. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_ru.properties +26 -0
  279. package/aqtion/docker/config/keycloak/themes/base/admin/messages/messages_zh_CN.properties +26 -0
  280. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/app.js +3858 -0
  281. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/authz/authz-app.js +569 -0
  282. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/authz/authz-controller.js +2845 -0
  283. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/authz/authz-services.js +218 -0
  284. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/controllers/clients.js +4054 -0
  285. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/controllers/groups.js +625 -0
  286. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/controllers/realm.js +4552 -0
  287. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/controllers/roles.js +48 -0
  288. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/controllers/users.js +2042 -0
  289. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/loaders.js +587 -0
  290. package/aqtion/docker/config/keycloak/themes/base/admin/resources/js/services.js +2265 -0
  291. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authentication-flow-bindings.html +83 -0
  292. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authentication-flows.html +72 -0
  293. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authenticator-config.html +52 -0
  294. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/mgmt/broker-permissions.html +40 -0
  295. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/mgmt/client-permissions.html +39 -0
  296. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/mgmt/client-role-permissions.html +40 -0
  297. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/mgmt/group-permissions.html +39 -0
  298. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/mgmt/realm-role-permissions.html +39 -0
  299. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/mgmt/users-permissions.html +35 -0
  300. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/permission/provider/resource-server-policy-resource-detail.html +131 -0
  301. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/permission/provider/resource-server-policy-scope-detail.html +137 -0
  302. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/permission/resource-server-permission-list.html +118 -0
  303. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-aggregate-detail.html +123 -0
  304. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-client-detail.html +93 -0
  305. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-client-scope-detail.html +126 -0
  306. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-group-detail.html +126 -0
  307. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-js-detail.html +68 -0
  308. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-regex-detail.html +100 -0
  309. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-role-detail.html +169 -0
  310. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-time-detail.html +119 -0
  311. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/provider/resource-server-policy-user-detail.html +93 -0
  312. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/resource-server-policy-evaluate-result.html +72 -0
  313. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/resource-server-policy-evaluate.html +267 -0
  314. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/policy/resource-server-policy-list.html +117 -0
  315. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/resource-server-detail.html +77 -0
  316. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/resource-server-export-settings.html +35 -0
  317. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/resource-server-list.html +49 -0
  318. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/resource-server-resource-detail.html +126 -0
  319. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/resource-server-resource-list.html +169 -0
  320. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/resource-server-scope-detail.html +50 -0
  321. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/authz/resource-server-scope-list.html +102 -0
  322. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/brute-force.html +114 -0
  323. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/ciba-policy.html +63 -0
  324. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/claims.html +62 -0
  325. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-clustering-node.html +37 -0
  326. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-clustering.html +76 -0
  327. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-credentials-generic.html +14 -0
  328. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-credentials-jwt.html +26 -0
  329. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-credentials-secret-jwt.html +55 -0
  330. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-credentials-secret.html +33 -0
  331. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-credentials-x509.html +28 -0
  332. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-credentials.html +38 -0
  333. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-detail.html +1080 -0
  334. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-import.html +46 -0
  335. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-initial-access-create.html +63 -0
  336. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-initial-access.html +55 -0
  337. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-installation.html +36 -0
  338. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-keys.html +146 -0
  339. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-list.html +68 -0
  340. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-mappers-add.html +53 -0
  341. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-mappers.html +55 -0
  342. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-offline-sessions.html +59 -0
  343. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-oidc-key-export.html +57 -0
  344. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-oidc-key-import.html +62 -0
  345. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-oidc-keys.html +108 -0
  346. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-policies-json.html +60 -0
  347. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-policies-list.html +74 -0
  348. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-policies-policy-edit-condition.html +65 -0
  349. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-policies-policy-edit.html +140 -0
  350. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-policies-profiles-edit-executor.html +65 -0
  351. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-policies-profiles-edit.html +97 -0
  352. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-policies-profiles-json.html +60 -0
  353. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-policies-profiles-list.html +80 -0
  354. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-protocol-mapper-detail.html +13 -0
  355. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-reg-policies.html +106 -0
  356. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-reg-policy-detail.html +68 -0
  357. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-reg-trusted-host-create.html +55 -0
  358. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-reg-trusted-host-detail.html +64 -0
  359. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-registration-access-token.html +18 -0
  360. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-revocation.html +30 -0
  361. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-role-attributes.html +45 -0
  362. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-role-detail.html +140 -0
  363. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-role-list.html +64 -0
  364. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-role-users.html +52 -0
  365. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-saml-key-export.html +63 -0
  366. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-saml-key-import.html +62 -0
  367. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-saml-keys.html +66 -0
  368. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scope-detail.html +102 -0
  369. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scope-list.html +60 -0
  370. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scope-mappers-add.html +53 -0
  371. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scope-mappers.html +55 -0
  372. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scope-mappings.html +127 -0
  373. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scope-protocol-mapper-detail.html +13 -0
  374. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scope-scope-mappings.html +116 -0
  375. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scopes-evaluate.html +268 -0
  376. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scopes-realm-default.html +99 -0
  377. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-scopes-setup.html +123 -0
  378. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-service-account-roles.html +140 -0
  379. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-sessions.html +57 -0
  380. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-storage-generic.html +207 -0
  381. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/client-storage-list.html +67 -0
  382. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/create-client.html +72 -0
  383. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/create-execution.html +31 -0
  384. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/create-flow-execution.html +55 -0
  385. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/create-flow.html +43 -0
  386. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/create-group.html +25 -0
  387. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/default-groups.html +91 -0
  388. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/defense-headers.html +71 -0
  389. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/forbidden.html +7 -0
  390. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/group-attributes.html +41 -0
  391. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/group-detail.html +28 -0
  392. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/group-list.html +50 -0
  393. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/group-members.html +48 -0
  394. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/group-role-mappings.html +111 -0
  395. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/home.html +4 -0
  396. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/identity-provider-mapper-detail.html +84 -0
  397. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/identity-provider-mappers.html +49 -0
  398. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/menu.html +26 -0
  399. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/modal/group-selector.html +50 -0
  400. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/modal/realm-events-admin-auth.html +8 -0
  401. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/modal/realm-events-admin-representation.html +3 -0
  402. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/modal/role-selector.html +39 -0
  403. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/modal/unregistered-required-action-selector.html +21 -0
  404. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/modal/user-credential-data.html +8 -0
  405. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/modal/view-key.html +18 -0
  406. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/modal/view-object.html +3 -0
  407. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/notfound.html +7 -0
  408. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/otp-policy.html +96 -0
  409. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/pagenotfound.html +7 -0
  410. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/partial-export.html +34 -0
  411. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/partial-import.html +130 -0
  412. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/password-policy.html +51 -0
  413. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/protocol-mapper-detail.html +64 -0
  414. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-cache-settings.html +30 -0
  415. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-create.html +45 -0
  416. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-default-roles.html +88 -0
  417. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-detail.html +90 -0
  418. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-events-admin.html +134 -0
  419. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-events-config.html +106 -0
  420. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-events.html +124 -0
  421. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-bitbucket.html +142 -0
  422. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-facebook-ext.html +7 -0
  423. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-facebook.html +1 -0
  424. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-github-ext.html +14 -0
  425. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-github.html +1 -0
  426. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-gitlab.html +142 -0
  427. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-google-ext.html +21 -0
  428. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-google.html +1 -0
  429. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-instagram-ext.html +0 -0
  430. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-instagram.html +1 -0
  431. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-keycloak-oidc.html +1 -0
  432. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-linkedin-ext.html +0 -0
  433. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-linkedin.html +1 -0
  434. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-microsoft-ext.html +0 -0
  435. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-microsoft.html +1 -0
  436. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-oidc.html +388 -0
  437. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-openshift-v3-ext.html +7 -0
  438. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-openshift-v3.html +164 -0
  439. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-openshift-v4-ext.html +7 -0
  440. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-openshift-v4.html +164 -0
  441. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-paypal-ext.html +7 -0
  442. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-paypal.html +1 -0
  443. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-saml.html +435 -0
  444. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-social.html +157 -0
  445. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-stackoverflow-ext.html +7 -0
  446. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-stackoverflow.html +1 -0
  447. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-twitter-ext.html +0 -0
  448. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider-twitter.html +1 -0
  449. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-identity-provider.html +81 -0
  450. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-keys-disabled.html +70 -0
  451. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-keys-generic.html +69 -0
  452. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-keys-passive.html +70 -0
  453. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-keys-providers.html +75 -0
  454. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-keys.html +73 -0
  455. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-list.html +20 -0
  456. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-localization-detail.html +50 -0
  457. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-localization-upload.html +37 -0
  458. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-localization.html +61 -0
  459. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-login-settings.html +107 -0
  460. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-role-users.html +50 -0
  461. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-smtp.html +96 -0
  462. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-theme-settings.html +97 -0
  463. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-tokens.html +401 -0
  464. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/realm-user-profile.html +372 -0
  465. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/required-actions.html +38 -0
  466. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/role-attributes.html +41 -0
  467. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/role-detail.html +135 -0
  468. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/role-list.html +63 -0
  469. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/role-mappings.html +119 -0
  470. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/server-info-providers.html +55 -0
  471. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/server-info.html +135 -0
  472. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/session-realm.html +34 -0
  473. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/session-revocation.html +30 -0
  474. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-attributes.html +41 -0
  475. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-consents.html +41 -0
  476. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-credentials.html +173 -0
  477. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-detail.html +186 -0
  478. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-federated-identity-detail.html +53 -0
  479. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-federated-identity-list.html +41 -0
  480. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-federation.html +69 -0
  481. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-group-membership.html +114 -0
  482. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-list.html +69 -0
  483. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-offline-sessions.html +35 -0
  484. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-sessions.html +43 -0
  485. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-storage-generic.html +246 -0
  486. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-storage-kerberos.html +264 -0
  487. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-storage-ldap-mapper-detail.html +64 -0
  488. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-storage-ldap-mappers.html +46 -0
  489. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-storage-ldap.html +568 -0
  490. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/user-storage.html +45 -0
  491. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/webauthn-policy-passwordless.html +177 -0
  492. package/aqtion/docker/config/keycloak/themes/base/admin/resources/partials/webauthn-policy.html +159 -0
  493. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/authz/kc-authz-modal.html +11 -0
  494. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/authz/kc-tabs-resource-server.html +14 -0
  495. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-component-config.html +67 -0
  496. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-copy.html +18 -0
  497. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-dropdown.html +12 -0
  498. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-edit.html +22 -0
  499. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-menu.html +65 -0
  500. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-modal-message.html +10 -0
  501. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-modal.html +11 -0
  502. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-paging.html +25 -0
  503. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-provider-config.html +104 -0
  504. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-switch.html +12 -0
  505. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-authentication.html +16 -0
  506. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-client-role.html +17 -0
  507. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-client-scope.html +20 -0
  508. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-client.html +65 -0
  509. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-clients.html +16 -0
  510. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-group-list.html +11 -0
  511. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-group.html +17 -0
  512. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-identity-provider.html +16 -0
  513. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-ldap.html +12 -0
  514. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-realm.html +24 -0
  515. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-role.html +16 -0
  516. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-user-storage.html +11 -0
  517. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-user.html +18 -0
  518. package/aqtion/docker/config/keycloak/themes/base/admin/resources/templates/kc-tabs-users.html +11 -0
  519. package/aqtion/docker/config/keycloak/themes/base/admin/theme.properties +1 -0
  520. package/aqtion/docker/config/keycloak/themes/base/email/html/email-test.ftl +4 -0
  521. package/aqtion/docker/config/keycloak/themes/base/email/html/email-update-confirmation.ftl +5 -0
  522. package/aqtion/docker/config/keycloak/themes/base/email/html/email-verification-with-code.ftl +4 -0
  523. package/aqtion/docker/config/keycloak/themes/base/email/html/email-verification.ftl +4 -0
  524. package/aqtion/docker/config/keycloak/themes/base/email/html/event-login_error.ftl +4 -0
  525. package/aqtion/docker/config/keycloak/themes/base/email/html/event-remove_totp.ftl +4 -0
  526. package/aqtion/docker/config/keycloak/themes/base/email/html/event-update_password.ftl +4 -0
  527. package/aqtion/docker/config/keycloak/themes/base/email/html/event-update_totp.ftl +4 -0
  528. package/aqtion/docker/config/keycloak/themes/base/email/html/executeActions.ftl +8 -0
  529. package/aqtion/docker/config/keycloak/themes/base/email/html/identity-provider-link.ftl +4 -0
  530. package/aqtion/docker/config/keycloak/themes/base/email/html/password-reset.ftl +4 -0
  531. package/aqtion/docker/config/keycloak/themes/base/email/html/template.ftl +7 -0
  532. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_ca.properties +21 -0
  533. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_cs.properties +60 -0
  534. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_da.properties +47 -0
  535. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_de.properties +43 -0
  536. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_en.properties +55 -0
  537. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_es.properties +21 -0
  538. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_fi.properties +46 -0
  539. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_fr.properties +46 -0
  540. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_hu.properties +47 -0
  541. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_it.properties +50 -0
  542. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_ja.properties +52 -0
  543. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_lt.properties +25 -0
  544. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_nl.properties +38 -0
  545. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_no.properties +24 -0
  546. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_pl.properties +56 -0
  547. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_pt_BR.properties +51 -0
  548. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_ru.properties +25 -0
  549. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_sk.properties +48 -0
  550. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_sv.properties +25 -0
  551. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_tr.properties +51 -0
  552. package/aqtion/docker/config/keycloak/themes/base/email/messages/messages_zh_CN.properties +25 -0
  553. package/aqtion/docker/config/keycloak/themes/base/email/text/email-test.ftl +2 -0
  554. package/aqtion/docker/config/keycloak/themes/base/email/text/email-update-confirmation.ftl +2 -0
  555. package/aqtion/docker/config/keycloak/themes/base/email/text/email-verification-with-code.ftl +2 -0
  556. package/aqtion/docker/config/keycloak/themes/base/email/text/email-verification.ftl +2 -0
  557. package/aqtion/docker/config/keycloak/themes/base/email/text/event-login_error.ftl +2 -0
  558. package/aqtion/docker/config/keycloak/themes/base/email/text/event-remove_totp.ftl +2 -0
  559. package/aqtion/docker/config/keycloak/themes/base/email/text/event-update_password.ftl +2 -0
  560. package/aqtion/docker/config/keycloak/themes/base/email/text/event-update_totp.ftl +2 -0
  561. package/aqtion/docker/config/keycloak/themes/base/email/text/executeActions.ftl +4 -0
  562. package/aqtion/docker/config/keycloak/themes/base/email/text/identity-provider-link.ftl +2 -0
  563. package/aqtion/docker/config/keycloak/themes/base/email/text/password-reset.ftl +2 -0
  564. package/aqtion/docker/config/keycloak/themes/base/email/theme.properties +1 -0
  565. package/aqtion/docker/config/keycloak/themes/base/login/cli_splash.ftl +7 -0
  566. package/aqtion/docker/config/keycloak/themes/base/login/code.ftl +19 -0
  567. package/aqtion/docker/config/keycloak/themes/base/login/delete-account-confirm.ftl +33 -0
  568. package/aqtion/docker/config/keycloak/themes/base/login/error.ftl +16 -0
  569. package/aqtion/docker/config/keycloak/themes/base/login/frontchannel-logout.ftl +30 -0
  570. package/aqtion/docker/config/keycloak/themes/base/login/idp-review-user-profile.ftl +23 -0
  571. package/aqtion/docker/config/keycloak/themes/base/login/info.ftl +24 -0
  572. package/aqtion/docker/config/keycloak/themes/base/login/login-config-totp.ftl +108 -0
  573. package/aqtion/docker/config/keycloak/themes/base/login/login-idp-link-confirm.ftl +13 -0
  574. package/aqtion/docker/config/keycloak/themes/base/login/login-idp-link-email.ftl +16 -0
  575. package/aqtion/docker/config/keycloak/themes/base/login/login-oauth-grant.ftl +68 -0
  576. package/aqtion/docker/config/keycloak/themes/base/login/login-oauth2-device-verify-user-code.ftl +31 -0
  577. package/aqtion/docker/config/keycloak/themes/base/login/login-otp.ftl +58 -0
  578. package/aqtion/docker/config/keycloak/themes/base/login/login-page-expired.ftl +11 -0
  579. package/aqtion/docker/config/keycloak/themes/base/login/login-password.ftl +43 -0
  580. package/aqtion/docker/config/keycloak/themes/base/login/login-recovery-authn-code-config.ftl +184 -0
  581. package/aqtion/docker/config/keycloak/themes/base/login/login-recovery-authn-code-input.ftl +32 -0
  582. package/aqtion/docker/config/keycloak/themes/base/login/login-reset-password.ftl +39 -0
  583. package/aqtion/docker/config/keycloak/themes/base/login/login-update-password.ftl +71 -0
  584. package/aqtion/docker/config/keycloak/themes/base/login/login-update-profile.ftl +99 -0
  585. package/aqtion/docker/config/keycloak/themes/base/login/login-username.ftl +87 -0
  586. package/aqtion/docker/config/keycloak/themes/base/login/login-verify-email.ftl +14 -0
  587. package/aqtion/docker/config/keycloak/themes/base/login/login-x509-info.ftl +55 -0
  588. package/aqtion/docker/config/keycloak/themes/base/login/login.ftl +105 -0
  589. package/aqtion/docker/config/keycloak/themes/base/login/logout-confirm.ftl +38 -0
  590. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_ca.properties +200 -0
  591. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_cs.properties +425 -0
  592. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_da.properties +363 -0
  593. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_de.properties +420 -0
  594. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_en.properties +501 -0
  595. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_es.properties +201 -0
  596. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_fi.properties +443 -0
  597. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_fr.properties +405 -0
  598. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_hu.properties +356 -0
  599. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_it.properties +354 -0
  600. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_ja.properties +356 -0
  601. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_lt.properties +216 -0
  602. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_lv.properties +254 -0
  603. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_nl.properties +294 -0
  604. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_no.properties +214 -0
  605. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_pl.properties +318 -0
  606. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_pt_BR.properties +381 -0
  607. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_ru.properties +217 -0
  608. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_sk.properties +265 -0
  609. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_sv.properties +214 -0
  610. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_tr.properties +296 -0
  611. package/aqtion/docker/config/keycloak/themes/base/login/messages/messages_zh_CN.properties +216 -0
  612. package/aqtion/docker/config/keycloak/themes/base/login/register-user-profile.ftl +74 -0
  613. package/aqtion/docker/config/keycloak/themes/base/login/register.ftl +141 -0
  614. package/aqtion/docker/config/keycloak/themes/base/login/resources/js/base64url.js +114 -0
  615. package/aqtion/docker/config/keycloak/themes/base/login/saml-post-form.ftl +25 -0
  616. package/aqtion/docker/config/keycloak/themes/base/login/select-authenticator.ftl +43 -0
  617. package/aqtion/docker/config/keycloak/themes/base/login/template.ftl +154 -0
  618. package/aqtion/docker/config/keycloak/themes/base/login/terms.ftl +15 -0
  619. package/aqtion/docker/config/keycloak/themes/base/login/theme.properties +1 -0
  620. package/aqtion/docker/config/keycloak/themes/base/login/update-email.ftl +42 -0
  621. package/aqtion/docker/config/keycloak/themes/base/login/update-user-profile.ftl +28 -0
  622. package/aqtion/docker/config/keycloak/themes/base/login/user-profile-commons.ftl +187 -0
  623. package/aqtion/docker/config/keycloak/themes/base/login/webauthn-authenticate.ftl +168 -0
  624. package/aqtion/docker/config/keycloak/themes/base/login/webauthn-error.ftl +36 -0
  625. package/aqtion/docker/config/keycloak/themes/base/login/webauthn-register.ftl +192 -0
  626. package/aqtion/docker/config/keycloak/themes/cerema/account/account.ftl +93 -0
  627. package/aqtion/docker/config/keycloak/themes/cerema/account/messages/messages_fr.properties +1 -0
  628. package/aqtion/docker/config/keycloak/themes/cerema/account/resources/css/account.css +292 -0
  629. package/aqtion/docker/config/keycloak/themes/cerema/account/resources/img/favicon.ico +0 -0
  630. package/aqtion/docker/config/keycloak/themes/cerema/account/resources/img/icon-sidebar-active.png +0 -0
  631. package/aqtion/docker/config/keycloak/themes/cerema/account/resources/img/keycloak-logo.png +0 -0
  632. package/aqtion/docker/config/keycloak/themes/cerema/account/resources/img/logo.png +0 -0
  633. package/aqtion/docker/config/keycloak/themes/cerema/account/theme.properties +11 -0
  634. package/aqtion/docker/config/keycloak/themes/cerema/admin/resources/css/styles.css +420 -0
  635. package/aqtion/docker/config/keycloak/themes/cerema/admin/resources/img/favicon.ico +0 -0
  636. package/aqtion/docker/config/keycloak/themes/cerema/admin/resources/img/keyclok-logo.png +0 -0
  637. package/aqtion/docker/config/keycloak/themes/cerema/admin/resources/img/keyclok-logo.svg +215 -0
  638. package/aqtion/docker/config/keycloak/themes/cerema/admin/resources/img/select-arrow.png +0 -0
  639. package/aqtion/docker/config/keycloak/themes/cerema/admin/theme.properties +3 -0
  640. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/errors.json +150 -0
  641. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/treeview/LICENSE +20 -0
  642. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/treeview/README.md +128 -0
  643. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/treeview/angular.treeview.js +97 -0
  644. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/treeview/angular.treeview.min.js +9 -0
  645. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/treeview/css/angular.treeview.css +99 -0
  646. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/treeview/img/file.png +0 -0
  647. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/treeview/img/folder-closed.png +0 -0
  648. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/treeview/img/folder.png +0 -0
  649. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/ui-bootstrap-tpls-0.11.0.js +4172 -0
  650. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/angular/version.json +22 -0
  651. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/components/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  652. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/components/font-awesome/fonts/fontawesome-webfont.svg +1085 -0
  653. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/components/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  654. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/components/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  655. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/components/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
  656. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/filesaver/FileSaver.js +189 -0
  657. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/fileupload/FileAPI.min.js +72 -0
  658. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/fileupload/angular-file-upload-html5-shim.js +25 -0
  659. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/fileupload/angular-file-upload-html5-shim.min.js +2 -0
  660. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/fileupload/angular-file-upload-shim.js +237 -0
  661. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/fileupload/angular-file-upload-shim.min.js +2 -0
  662. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/fileupload/angular-file-upload.js +156 -0
  663. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/fileupload/angular-file-upload.min.js +2 -0
  664. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/css/patternfly.css +14320 -0
  665. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Bold-webfont.eot +0 -0
  666. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Bold-webfont.svg +2014 -0
  667. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Bold-webfont.ttf +0 -0
  668. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Bold-webfont.woff +0 -0
  669. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  670. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-BoldItalic-webfont.svg +2019 -0
  671. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-BoldItalic-webfont.ttf +0 -0
  672. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  673. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-ExtraBold-webfont.eot +0 -0
  674. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-ExtraBold-webfont.svg +2016 -0
  675. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-ExtraBold-webfont.ttf +0 -0
  676. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-ExtraBold-webfont.woff +0 -0
  677. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-ExtraBoldItalic-webfont.eot +0 -0
  678. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-ExtraBoldItalic-webfont.svg +2024 -0
  679. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-ExtraBoldItalic-webfont.ttf +0 -0
  680. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-ExtraBoldItalic-webfont.woff +0 -0
  681. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Italic-webfont.eot +0 -0
  682. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Italic-webfont.svg +2019 -0
  683. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Italic-webfont.ttf +0 -0
  684. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Italic-webfont.woff +0 -0
  685. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Light-webfont.eot +0 -0
  686. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Light-webfont.svg +2013 -0
  687. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Light-webfont.ttf +0 -0
  688. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Light-webfont.woff +0 -0
  689. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  690. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-LightItalic-webfont.svg +2021 -0
  691. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-LightItalic-webfont.ttf +0 -0
  692. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  693. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Regular-webfont.eot +0 -0
  694. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Regular-webfont.svg +2017 -0
  695. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Regular-webfont.ttf +0 -0
  696. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Regular-webfont.woff +0 -0
  697. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Semibold-webfont.eot +0 -0
  698. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Semibold-webfont.svg +2015 -0
  699. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Semibold-webfont.ttf +0 -0
  700. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-Semibold-webfont.woff +0 -0
  701. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
  702. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-SemiboldItalic-webfont.svg +2019 -0
  703. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  704. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
  705. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/PatternFlyIcons-webfont.eot +0 -0
  706. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/PatternFlyIcons-webfont.svg +133 -0
  707. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/PatternFlyIcons-webfont.ttf +0 -0
  708. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/fonts/PatternFlyIcons-webfont.woff +0 -0
  709. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/apple-touch-icon-114-precomposed.png +0 -0
  710. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/apple-touch-icon-144-precomposed.png +0 -0
  711. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/apple-touch-icon-57-precomposed.png +0 -0
  712. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/apple-touch-icon-72-precomposed.png +0 -0
  713. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/bg-login.jpg +0 -0
  714. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/spinner-lg.gif +0 -0
  715. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/spinner-sm.gif +0 -0
  716. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/spinner-xs.gif +0 -0
  717. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/patternfly/img/spinner.gif +0 -0
  718. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/ace.js +18957 -0
  719. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/min/ace.js +7950 -0
  720. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/min/mode-javascript.js +1 -0
  721. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/min/theme-github.js +1 -0
  722. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/min/worker-javascript.js +1 -0
  723. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/mode-javascript.js +1140 -0
  724. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/theme-github.js +103 -0
  725. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/ui-ace.js +327 -0
  726. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/ui-ace.min.js +7 -0
  727. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/ui-ace/worker-javascript.js +12651 -0
  728. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/zocial/zocial-regular-webfont.eot +0 -0
  729. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/zocial/zocial-regular-webfont.svg +1108 -0
  730. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/zocial/zocial-regular-webfont.ttf +0 -0
  731. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/zocial/zocial-regular-webfont.woff +0 -0
  732. package/aqtion/docker/config/keycloak/themes/cerema/common/resources/lib/zocial/zocial.css +1215 -0
  733. package/aqtion/docker/config/keycloak/themes/cerema/email/html/email-verification.ftl +4 -0
  734. package/aqtion/docker/config/keycloak/themes/cerema/email/html/template.ftl +7 -0
  735. package/aqtion/docker/config/keycloak/themes/cerema/email/messages/messages_en.properties +9 -0
  736. package/aqtion/docker/config/keycloak/themes/cerema/email/messages/messages_fr.properties +9 -0
  737. package/aqtion/docker/config/keycloak/themes/cerema/email/theme.properties +1 -0
  738. package/aqtion/docker/config/keycloak/themes/cerema/login/login-oauth-grant.ftl +57 -0
  739. package/aqtion/docker/config/keycloak/themes/cerema/login/login-reset-password.ftl +32 -0
  740. package/aqtion/docker/config/keycloak/themes/cerema/login/login.ftl +87 -0
  741. package/aqtion/docker/config/keycloak/themes/cerema/login/messages/messages_fr.properties +29 -0
  742. package/aqtion/docker/config/keycloak/themes/cerema/login/register.ftl +169 -0
  743. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/css/bamboo.css +238 -0
  744. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/css/main.css +1029 -0
  745. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/css/util.css +9826 -0
  746. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Linearicons-Free-v1.0.0/WebFont/Linearicons-Free.eot +0 -0
  747. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Linearicons-Free-v1.0.0/WebFont/Linearicons-Free.svg +541 -0
  748. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Linearicons-Free-v1.0.0/WebFont/Linearicons-Free.ttf +0 -0
  749. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Linearicons-Free-v1.0.0/WebFont/Linearicons-Free.woff +0 -0
  750. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Linearicons-Free-v1.0.0/WebFont/Linearicons-Free.woff2 +0 -0
  751. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Linearicons-Free-v1.0.0/icon-font.min.css +7 -0
  752. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/OFL.txt +95 -0
  753. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-Black.ttf +0 -0
  754. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-BlackItalic.ttf +0 -0
  755. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-Bold.ttf +0 -0
  756. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-BoldItalic.ttf +0 -0
  757. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-ExtraBold.ttf +0 -0
  758. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-ExtraBoldItalic.ttf +0 -0
  759. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-ExtraLight.ttf +0 -0
  760. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-ExtraLightItalic.ttf +0 -0
  761. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-Italic.ttf +0 -0
  762. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-Light.ttf +0 -0
  763. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-LightItalic.ttf +0 -0
  764. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-Medium.ttf +0 -0
  765. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-MediumItalic.ttf +0 -0
  766. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-Regular.ttf +0 -0
  767. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-SemiBold.ttf +0 -0
  768. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-SemiBoldItalic.ttf +0 -0
  769. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-Thin.ttf +0 -0
  770. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Raleway/Raleway-ThinItalic.ttf +0 -0
  771. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/SIL Open Font License.txt +155 -0
  772. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-Black.otf +0 -0
  773. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-Bold.otf +0 -0
  774. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-BoldItalic.otf +0 -0
  775. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-BoldUpright.otf +0 -0
  776. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-Light.otf +0 -0
  777. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-LightItalic.otf +0 -0
  778. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-LightUpright.otf +0 -0
  779. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-Regular.otf +0 -0
  780. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-RegularItalic.otf +0 -0
  781. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-RegularUpright.otf +0 -0
  782. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-Semibold.otf +0 -0
  783. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-SemiboldItalic.otf +0 -0
  784. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-SemiboldUpright.otf +0 -0
  785. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-Thin.otf +0 -0
  786. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-ThinItalic.otf +0 -0
  787. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/Titillium/Titillium-ThinUpright.otf +0 -0
  788. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/HELP-US-OUT.txt +7 -0
  789. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/css/font-awesome.css +3049 -0
  790. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/css/font-awesome.min.css +4 -0
  791. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/fonts/FontAwesome.otf +0 -0
  792. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.eot +0 -0
  793. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.svg +2672 -0
  794. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf +0 -0
  795. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff +0 -0
  796. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 +0 -0
  797. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/animated.less +34 -0
  798. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/bordered-pulled.less +45 -0
  799. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/core.less +12 -0
  800. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/fixed-width.less +6 -0
  801. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/font-awesome.less +18 -0
  802. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/icons.less +2813 -0
  803. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/larger.less +25 -0
  804. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/list.less +24 -0
  805. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/mixins.less +60 -0
  806. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/path.less +15 -0
  807. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/rotated-flipped.less +33 -0
  808. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/screen-reader.less +10 -0
  809. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/stacked.less +30 -0
  810. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/less/variables.less +800 -0
  811. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_animated.scss +34 -0
  812. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_bordered-pulled.scss +45 -0
  813. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_core.scss +12 -0
  814. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_fixed-width.scss +6 -0
  815. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_icons.scss +2813 -0
  816. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_larger.scss +25 -0
  817. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_list.scss +24 -0
  818. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_mixins.scss +60 -0
  819. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_path.scss +15 -0
  820. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_rotated-flipped.scss +33 -0
  821. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_screen-reader.scss +10 -0
  822. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_stacked.scss +30 -0
  823. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/_variables.scss +800 -0
  824. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/font-awesome-4.7.0/scss/font-awesome.scss +18 -0
  825. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-Black.ttf +0 -0
  826. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-BlackItalic.ttf +0 -0
  827. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-Bold.ttf +0 -0
  828. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-BoldItalic.ttf +0 -0
  829. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-ExtraBold.ttf +0 -0
  830. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
  831. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-ExtraLight.ttf +0 -0
  832. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
  833. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-Italic.ttf +0 -0
  834. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-Light.ttf +0 -0
  835. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-LightItalic.ttf +0 -0
  836. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-Medium.ttf +0 -0
  837. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-MediumItalic.ttf +0 -0
  838. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-Regular.ttf +0 -0
  839. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-SemiBold.ttf +0 -0
  840. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
  841. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-Thin.ttf +0 -0
  842. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/Montserrat-ThinItalic.ttf +0 -0
  843. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/montserrat/OFL.txt +93 -0
  844. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-Black.ttf +0 -0
  845. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-BlackItalic.ttf +0 -0
  846. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-Bold.ttf +0 -0
  847. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-BoldItalic.ttf +0 -0
  848. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-ExtraBold.ttf +0 -0
  849. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-ExtraBoldItalic.ttf +0 -0
  850. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-ExtraLight.ttf +0 -0
  851. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-ExtraLightItalic.ttf +0 -0
  852. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-Italic.ttf +0 -0
  853. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-Light.ttf +0 -0
  854. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-LightItalic.ttf +0 -0
  855. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-Medium.ttf +0 -0
  856. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-MediumItalic.ttf +0 -0
  857. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-Regular.ttf +0 -0
  858. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-SemiBold.ttf +0 -0
  859. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-SemiBoldItalic.ttf +0 -0
  860. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-Thin.ttf +0 -0
  861. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/fonts/poppins/Poppins-ThinItalic.ttf +0 -0
  862. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/agentconnect-btn-principal-hover.svg +39 -0
  863. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/agentconnect-btn-principal.svg +39 -0
  864. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/bg-01.jpg +0 -0
  865. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/bg-02.jpg +0 -0
  866. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/franceconnect-btn-hover.svg +13 -0
  867. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/franceconnect-btn.svg +13 -0
  868. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/icons/favicon.ico +0 -0
  869. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/logo.png +0 -0
  870. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/images/white_logo.png +0 -0
  871. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/js/bamboo.js +950 -0
  872. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/js/main.js +73 -0
  873. package/aqtion/docker/config/keycloak/themes/cerema/login/resources/vendor/jquery/jquery-3.2.1.min.js +4 -0
  874. package/aqtion/docker/config/keycloak/themes/cerema/login/template.ftl +119 -0
  875. package/aqtion/docker/config/keycloak/themes/cerema/login/theme.properties +94 -0
  876. package/aqtion/docker/config/keycloak/themes/cerema/welcome/index.ftl +141 -0
  877. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/admin-console.png +0 -0
  878. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/alert.png +0 -0
  879. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/bg.png +0 -0
  880. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/bug.png +0 -0
  881. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/css/welcome.css +165 -0
  882. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/favicon.ico +0 -0
  883. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/jboss_community.png +0 -0
  884. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/keycloak-project.png +0 -0
  885. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/keycloak_logo.png +0 -0
  886. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/logo.png +0 -0
  887. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/mail.png +0 -0
  888. package/aqtion/docker/config/keycloak/themes/cerema/welcome/resources/user.png +0 -0
  889. package/aqtion/docker/config/keycloak/themes/cerema/welcome/theme.properties +4 -0
  890. package/aqtion/docker/config/keycloak/themes/keycloak/account/resources/css/account.css +277 -0
  891. package/aqtion/docker/config/keycloak/themes/keycloak/account/resources/img/icon-sidebar-active.png +0 -0
  892. package/aqtion/docker/config/keycloak/themes/keycloak/account/resources/img/keycloak-logo.png +0 -0
  893. package/aqtion/docker/config/keycloak/themes/keycloak/account/resources/img/logo.png +0 -0
  894. package/aqtion/docker/config/keycloak/themes/keycloak/account/theme.properties +14 -0
  895. package/aqtion/docker/config/keycloak/themes/keycloak/admin/resources/css/styles.css +505 -0
  896. package/aqtion/docker/config/keycloak/themes/keycloak/admin/resources/img/keyclok-logo.png +0 -0
  897. package/aqtion/docker/config/keycloak/themes/keycloak/admin/resources/img/keyclok-logo.svg +194 -0
  898. package/aqtion/docker/config/keycloak/themes/keycloak/admin/resources/img/select-arrow.png +0 -0
  899. package/aqtion/docker/config/keycloak/themes/keycloak/admin/theme.properties +5 -0
  900. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/img/favicon.ico +0 -0
  901. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/errors.json +1 -0
  902. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/treeview/LICENSE +20 -0
  903. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/treeview/angular.treeview.js +95 -0
  904. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/treeview/angular.treeview.min.js +9 -0
  905. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/treeview/css/angular.treeview.css +99 -0
  906. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/treeview/img/file.png +0 -0
  907. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/treeview/img/folder-closed.png +0 -0
  908. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/treeview/img/folder.png +0 -0
  909. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/ui-bootstrap-tpls-0.11.0.js +4116 -0
  910. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/angular/version.json +1 -0
  911. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/filesaver/FileSaver.js +188 -0
  912. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/fileupload/FileAPI.min.js +72 -0
  913. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/fileupload/angular-file-upload-html5-shim.js +25 -0
  914. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/fileupload/angular-file-upload-html5-shim.min.js +2 -0
  915. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/fileupload/angular-file-upload-shim.js +215 -0
  916. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/fileupload/angular-file-upload-shim.min.js +2 -0
  917. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/fileupload/angular-file-upload.js +156 -0
  918. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/fileupload/angular-file-upload.min.js +2 -0
  919. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/pficon/pficon.css +21 -0
  920. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/pficon/pficon.woff +0 -0
  921. package/aqtion/docker/config/keycloak/themes/keycloak/common/resources/lib/pficon/pficon.woff2 +0 -0
  922. package/aqtion/docker/config/keycloak/themes/keycloak/email/theme.properties +1 -0
  923. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/css/login.css +596 -0
  924. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/feedback-error-arrow-down.png +0 -0
  925. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/feedback-error-sign.png +0 -0
  926. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/feedback-success-arrow-down.png +0 -0
  927. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/feedback-success-sign.png +0 -0
  928. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/feedback-warning-arrow-down.png +0 -0
  929. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/feedback-warning-sign.png +0 -0
  930. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/keycloak-bg.png +0 -0
  931. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/keycloak-logo-text.png +0 -0
  932. package/aqtion/docker/config/keycloak/themes/keycloak/login/resources/img/keycloak-logo.png +0 -0
  933. package/aqtion/docker/config/keycloak/themes/keycloak/login/theme.properties +161 -0
  934. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/index.ftl +132 -0
  935. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/admin-console.png +0 -0
  936. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/alert.png +0 -0
  937. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/bg.png +0 -0
  938. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/bug.png +0 -0
  939. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/css/welcome.css +140 -0
  940. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/keycloak-project.png +0 -0
  941. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/keycloak_logo.png +0 -0
  942. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/logo.png +0 -0
  943. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/mail.png +0 -0
  944. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/resources/user.png +0 -0
  945. package/aqtion/docker/config/keycloak/themes/keycloak/welcome/theme.properties +7 -0
  946. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/index.ftl +295 -0
  947. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_ca.properties +1 -0
  948. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_cs.properties +1 -0
  949. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_da.properties +1 -0
  950. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_de.properties +129 -0
  951. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_en.properties +167 -0
  952. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_es.properties +1 -0
  953. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_fr.properties +44 -0
  954. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_hu.properties +1 -0
  955. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_it.properties +1 -0
  956. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_ja.properties +1 -0
  957. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_lt.properties +1 -0
  958. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_nl.properties +1 -0
  959. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_no.properties +1 -0
  960. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_pl.properties +1 -0
  961. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_pt_BR.properties +121 -0
  962. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_ru.properties +1 -0
  963. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_sk.properties +1 -0
  964. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_sv.properties +1 -0
  965. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_tr.properties +1 -0
  966. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/messages/messages_zh_CN.properties +1 -0
  967. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/App.js +69 -0
  968. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/App.js.map +1 -0
  969. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/ContentPages.js +157 -0
  970. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/ContentPages.js.map +1 -0
  971. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/Main.js +97 -0
  972. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/Main.js.map +1 -0
  973. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/PageHeaderTool.js +29 -0
  974. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/PageHeaderTool.js.map +1 -0
  975. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/PageNav.js +51 -0
  976. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/PageNav.js.map +1 -0
  977. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/PageToolbar.js +60 -0
  978. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/PageToolbar.js.map +1 -0
  979. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/account-service/AccountServiceContext.js +3 -0
  980. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/account-service/AccountServiceContext.js.map +1 -0
  981. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/account-service/account.service.js +149 -0
  982. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/account-service/account.service.js.map +1 -0
  983. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/ContentAlert.js +113 -0
  984. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/ContentAlert.js.map +1 -0
  985. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/ContentPage.js +63 -0
  986. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/ContentPage.js.map +1 -0
  987. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/account-page/AccountPage.js +302 -0
  988. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/account-page/AccountPage.js.map +1 -0
  989. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/aia-page/AppInitiatedActionPage.js +70 -0
  990. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/aia-page/AppInitiatedActionPage.js.map +1 -0
  991. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/applications-page/ApplicationsPage.js +186 -0
  992. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/applications-page/ApplicationsPage.js.map +1 -0
  993. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/authenticator-page/AuthenticatorPage.js +28 -0
  994. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/authenticator-page/AuthenticatorPage.js.map +1 -0
  995. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/device-activity-page/DeviceActivityPage.js +250 -0
  996. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/device-activity-page/DeviceActivityPage.js.map +1 -0
  997. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/forbidden-page/ForbiddenPage.js +36 -0
  998. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/forbidden-page/ForbiddenPage.js.map +1 -0
  999. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/linked-accounts-page/LinkedAccountsPage.js +310 -0
  1000. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/linked-accounts-page/LinkedAccountsPage.js.map +1 -0
  1001. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/AbstractResourceTable.js +40 -0
  1002. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/AbstractResourceTable.js.map +1 -0
  1003. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/EditTheResource.js +120 -0
  1004. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/EditTheResource.js.map +1 -0
  1005. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/MyResourcesPage.js +284 -0
  1006. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/MyResourcesPage.js.map +1 -0
  1007. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/PermissionRequest.js +151 -0
  1008. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/PermissionRequest.js.map +1 -0
  1009. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/PermissionSelect.js +103 -0
  1010. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/PermissionSelect.js.map +1 -0
  1011. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/ResourcesTable.js +313 -0
  1012. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/ResourcesTable.js.map +1 -0
  1013. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/ShareTheResource.js +222 -0
  1014. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/ShareTheResource.js.map +1 -0
  1015. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/SharedResourcesTable.js +97 -0
  1016. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/SharedResourcesTable.js.map +1 -0
  1017. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/resource-model.js +16 -0
  1018. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/my-resources-page/resource-model.js.map +1 -0
  1019. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/page-not-found/PageNotFound.js +31 -0
  1020. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/page-not-found/PageNotFound.js.map +1 -0
  1021. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/signingin-page/SigningInPage.js +350 -0
  1022. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content/signingin-page/SigningInPage.js.map +1 -0
  1023. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/content.json +60 -0
  1024. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_facebook_transparent.svg +19 -0
  1025. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_github_transparent.svg +16 -0
  1026. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_google_transparent.svg +77 -0
  1027. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_instagram_transparent.svg +23 -0
  1028. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_linkedin_transparent.svg +23 -0
  1029. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_microsoft_transparent.svg +34 -0
  1030. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_openshift_transparent.svg +15 -0
  1031. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_stack_transparent.svg +26 -0
  1032. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/img/socialmedia/socialmedia_icons_twitter_transparent.svg +19 -0
  1033. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/keycloak-service/KeycloakContext.js +3 -0
  1034. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/keycloak-service/KeycloakContext.js.map +1 -0
  1035. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/keycloak-service/keycloak.service.js +77 -0
  1036. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/keycloak-service/keycloak.service.js.map +1 -0
  1037. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/util/AIACommand.js +33 -0
  1038. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/util/AIACommand.js.map +1 -0
  1039. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/util/ParseLink.js +19 -0
  1040. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/util/ParseLink.js.map +1 -0
  1041. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/util/RedirectUri.js +39 -0
  1042. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/util/RedirectUri.js.map +1 -0
  1043. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/util/TimeUtil.js +50 -0
  1044. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/util/TimeUtil.js.map +1 -0
  1045. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/welcome-page-scripts.js +89 -0
  1046. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/ContinueCancelModal.js +103 -0
  1047. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/ContinueCancelModal.js.map +1 -0
  1048. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/EmptyMessageState.js +38 -0
  1049. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/EmptyMessageState.js.map +1 -0
  1050. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/LocaleSelectors.js +41 -0
  1051. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/LocaleSelectors.js.map +1 -0
  1052. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/Logout.js +46 -0
  1053. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/Logout.js.map +1 -0
  1054. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/Msg.js +69 -0
  1055. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/Msg.js.map +1 -0
  1056. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/ReferrerDropdownItem.js +38 -0
  1057. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/ReferrerDropdownItem.js.map +1 -0
  1058. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/ReferrerLink.js +46 -0
  1059. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/ReferrerLink.js.map +1 -0
  1060. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/features.js +2 -0
  1061. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/resources/widgets/features.js.map +1 -0
  1062. package/aqtion/docker/config/keycloak/themes/keycloak.v2/account/theme.properties +18 -0
  1063. package/aqtion/docker/config/servers.json +14 -0
  1064. package/aqtion/docker/setup/docker-compose.yml +67 -0
  1065. package/aqtion/frontend/app/components/.gitkeep +0 -0
  1066. package/aqtion/frontend/app/interfaces/.gitkeep +0 -0
  1067. package/aqtion/frontend/app/menu.json +41 -0
  1068. package/aqtion/frontend/app/pages/pages-routing.module.ts +19 -0
  1069. package/aqtion/frontend/app/pages/profil/profil.component.html +3 -0
  1070. package/aqtion/frontend/app/pages/profil/profil.component.scss +0 -0
  1071. package/aqtion/frontend/app/pages/profil/profil.component.ts +27 -0
  1072. package/aqtion/frontend/app/pages/root/root.component.html +3 -0
  1073. package/aqtion/frontend/app/pages/root/root.component.scss +22 -0
  1074. package/aqtion/frontend/app/pages/root/root.component.ts +16 -0
  1075. package/aqtion/frontend/app/services/profils.service.ts +25 -0
  1076. package/aqtion/frontend/app-routing.module.ts +61 -0
  1077. package/aqtion/frontend/app.component.css +46 -0
  1078. package/aqtion/frontend/app.component.html +1 -0
  1079. package/aqtion/frontend/app.component.ts +60 -0
  1080. package/aqtion/frontend/app.module.ts +103 -0
  1081. package/aqtion/frontend/assets/favicon.ico +0 -0
  1082. package/aqtion/frontend/assets/i18n/fr.json +33 -0
  1083. package/aqtion/frontend/assets/images/599x157.png +0 -0
  1084. package/aqtion/frontend/assets/images/cerema.png +0 -0
  1085. package/aqtion/frontend/assets/images/dollar.svg +1 -0
  1086. package/aqtion/frontend/assets/images/logo.png +0 -0
  1087. package/aqtion/frontend/assets/images/logo_title.png +0 -0
  1088. package/aqtion/frontend/assets/images/logorobot.png +0 -0
  1089. package/aqtion/frontend/assets/images/work-in-progress.svg +64 -0
  1090. package/aqtion/frontend/assets/layout/fonts/lato-v17-latin-ext_latin-300.woff +0 -0
  1091. package/aqtion/frontend/assets/layout/fonts/lato-v17-latin-ext_latin-300.woff2 +0 -0
  1092. package/aqtion/frontend/assets/layout/fonts/lato-v17-latin-ext_latin-700.woff +0 -0
  1093. package/aqtion/frontend/assets/layout/fonts/lato-v17-latin-ext_latin-700.woff2 +0 -0
  1094. package/aqtion/frontend/assets/layout/fonts/lato-v17-latin-ext_latin-regular.woff +0 -0
  1095. package/aqtion/frontend/assets/layout/fonts/lato-v17-latin-ext_latin-regular.woff2 +0 -0
  1096. package/aqtion/frontend/assets/layout/images/LogoCerema.svg +226 -0
  1097. package/aqtion/frontend/assets/layout/images/LogoCerema_horizontal.svg +167 -0
  1098. package/aqtion/frontend/assets/layout/images/SpinnerCerema.svg +6 -0
  1099. package/aqtion/frontend/assets/layout/images/Swagger-logo.png +0 -0
  1100. package/aqtion/frontend/assets/layout/images/authentication.svg +1 -0
  1101. package/aqtion/frontend/assets/layout/images/mail.svg +1 -0
  1102. package/aqtion/frontend/assets/layout/images/postgresql.svg +1 -0
  1103. package/aqtion/frontend/assets/layout/images/user.png +0 -0
  1104. package/aqtion/frontend/assets/layout/styles/layout/_breadcrumb.scss +18 -0
  1105. package/aqtion/frontend/assets/layout/styles/layout/_config.scss +33 -0
  1106. package/aqtion/frontend/assets/layout/styles/layout/_content.scss +20 -0
  1107. package/aqtion/frontend/assets/layout/styles/layout/_fonts.scss +29 -0
  1108. package/aqtion/frontend/assets/layout/styles/layout/_footer.scss +25 -0
  1109. package/aqtion/frontend/assets/layout/styles/layout/_main.scss +29 -0
  1110. package/aqtion/frontend/assets/layout/styles/layout/_responsive.scss +160 -0
  1111. package/aqtion/frontend/assets/layout/styles/layout/_sidebar.scss +2 -0
  1112. package/aqtion/frontend/assets/layout/styles/layout/_topbar.scss +250 -0
  1113. package/aqtion/frontend/assets/layout/styles/layout/_typography.scss +63 -0
  1114. package/aqtion/frontend/assets/layout/styles/layout/_utils.scss +19 -0
  1115. package/aqtion/frontend/assets/layout/styles/layout/layout.scss +15 -0
  1116. package/aqtion/frontend/assets/layout/styles/layout/preloading.css +73 -0
  1117. package/aqtion/frontend/assets/layout/styles/layout/preloading.scss +79 -0
  1118. package/aqtion/frontend/assets/layout/styles/layout/sidebar/_sidebar_slim.scss +132 -0
  1119. package/aqtion/frontend/assets/layout/styles/layout/sidebar/_sidebar_vertical.scss +132 -0
  1120. package/aqtion/frontend/assets/layout/styles/layout/theme/_dark.scss +10 -0
  1121. package/aqtion/frontend/assets/layout/styles/layout/theme/_light.scss +10 -0
  1122. package/aqtion/frontend/assets/layout/styles/layout/theme/_primary.scss +10 -0
  1123. package/aqtion/frontend/assets/layout/styles/layout/theme/_themes.scss +3 -0
  1124. package/aqtion/frontend/assets/layout/styles/theme/designer/_colors.scss +17 -0
  1125. package/aqtion/frontend/assets/layout/styles/theme/designer/_common.scss +68 -0
  1126. package/aqtion/frontend/assets/layout/styles/theme/designer/_components.scss +102 -0
  1127. package/aqtion/frontend/assets/layout/styles/theme/designer/_mixins.scss +203 -0
  1128. package/aqtion/frontend/assets/layout/styles/theme/designer/components/button/_button.scss +560 -0
  1129. package/aqtion/frontend/assets/layout/styles/theme/designer/components/button/_speeddial.scss +81 -0
  1130. package/aqtion/frontend/assets/layout/styles/theme/designer/components/button/_splitbutton.scss +381 -0
  1131. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_carousel.scss +37 -0
  1132. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_datatable.scss +278 -0
  1133. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_dataview.scss +55 -0
  1134. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_filter.scss +138 -0
  1135. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_fullcalendar.scss +329 -0
  1136. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_orderlist.scss +103 -0
  1137. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_organizationchart.scss +50 -0
  1138. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_paginator.scss +92 -0
  1139. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_picklist.scss +103 -0
  1140. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_timeline.scss +38 -0
  1141. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_tree.scss +144 -0
  1142. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_treetable.scss +246 -0
  1143. package/aqtion/frontend/assets/layout/styles/theme/designer/components/data/_virtualscroller.scss +28 -0
  1144. package/aqtion/frontend/assets/layout/styles/theme/designer/components/file/_fileupload.scss +58 -0
  1145. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_breadcrumb.scss +42 -0
  1146. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_contextmenu.scss +56 -0
  1147. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_dock.scss +86 -0
  1148. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_megamenu.scss +106 -0
  1149. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_menu.scss +45 -0
  1150. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_menubar.scss +183 -0
  1151. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_panelmenu.scss +140 -0
  1152. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_slidemenu.scss +59 -0
  1153. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_steps.scss +56 -0
  1154. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_tabmenu.scss +69 -0
  1155. package/aqtion/frontend/assets/layout/styles/theme/designer/components/menu/_tieredmenu.scss +60 -0
  1156. package/aqtion/frontend/assets/layout/styles/theme/designer/components/messages/_inlinemessage.scss +64 -0
  1157. package/aqtion/frontend/assets/layout/styles/theme/designer/components/messages/_message.scss +102 -0
  1158. package/aqtion/frontend/assets/layout/styles/theme/designer/components/messages/_toast.scss +95 -0
  1159. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_avatar.scss +30 -0
  1160. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_badge.scss +48 -0
  1161. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_blockui.scss +0 -0
  1162. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_chip.scss +38 -0
  1163. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_inplace.scss +17 -0
  1164. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_progressbar.scss +17 -0
  1165. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_scrolltop.scss +20 -0
  1166. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_skeleton.scss +8 -0
  1167. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_tag.scss +35 -0
  1168. package/aqtion/frontend/assets/layout/styles/theme/designer/components/misc/_terminal.scss +11 -0
  1169. package/aqtion/frontend/assets/layout/styles/theme/designer/components/multimedia/_galleria.scss +139 -0
  1170. package/aqtion/frontend/assets/layout/styles/theme/designer/components/multimedia/_image.scss +44 -0
  1171. package/aqtion/frontend/assets/layout/styles/theme/designer/components/overlay/_confirmpopup.scss +65 -0
  1172. package/aqtion/frontend/assets/layout/styles/theme/designer/components/overlay/_dialog.scss +64 -0
  1173. package/aqtion/frontend/assets/layout/styles/theme/designer/components/overlay/_overlaypanel.scss +62 -0
  1174. package/aqtion/frontend/assets/layout/styles/theme/designer/components/overlay/_sidebar.scss +23 -0
  1175. package/aqtion/frontend/assets/layout/styles/theme/designer/components/overlay/_tooltip.scss +33 -0
  1176. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_accordion.scss +119 -0
  1177. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_card.scss +30 -0
  1178. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_divider.scss +31 -0
  1179. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_fieldset.scss +47 -0
  1180. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_panel.scss +58 -0
  1181. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_scrollpanel.scss +6 -0
  1182. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_splitter.scss +19 -0
  1183. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_tabview.scss +78 -0
  1184. package/aqtion/frontend/assets/layout/styles/theme/designer/components/panel/_toolbar.scss +10 -0
  1185. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/_extensions.scss +90 -0
  1186. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/_variables.scss +867 -0
  1187. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/blue/theme.css +7341 -0
  1188. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/blue/theme.scss +12 -0
  1189. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/cyan/theme.css +7341 -0
  1190. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/cyan/theme.scss +12 -0
  1191. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/deeppurple/theme.css +7341 -0
  1192. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/deeppurple/theme.scss +12 -0
  1193. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/green/theme.css +7341 -0
  1194. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/green/theme.scss +12 -0
  1195. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/indigo/theme.css +7341 -0
  1196. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/indigo/theme.scss +12 -0
  1197. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/lime/theme.css +7341 -0
  1198. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/lime/theme.scss +12 -0
  1199. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/orange/theme.css +7341 -0
  1200. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/orange/theme.scss +12 -0
  1201. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/pink/theme.css +7341 -0
  1202. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/pink/theme.scss +12 -0
  1203. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/purple/theme.css +7341 -0
  1204. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/purple/theme.scss +12 -0
  1205. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/yellow/theme.css +7341 -0
  1206. package/aqtion/frontend/assets/layout/styles/theme/theme-dark/yellow/theme.scss +12 -0
  1207. package/aqtion/frontend/assets/layout/styles/theme/theme-light/_extensions.scss +90 -0
  1208. package/aqtion/frontend/assets/layout/styles/theme/theme-light/_variables.scss +870 -0
  1209. package/aqtion/frontend/assets/layout/styles/theme/theme-light/blue/theme.css +7540 -0
  1210. package/aqtion/frontend/assets/layout/styles/theme/theme-light/blue/theme.scss +12 -0
  1211. package/aqtion/frontend/assets/layout/styles/theme/theme-light/cyan/theme.css +7341 -0
  1212. package/aqtion/frontend/assets/layout/styles/theme/theme-light/cyan/theme.scss +12 -0
  1213. package/aqtion/frontend/assets/layout/styles/theme/theme-light/deeppurple/theme.css +7341 -0
  1214. package/aqtion/frontend/assets/layout/styles/theme/theme-light/deeppurple/theme.scss +12 -0
  1215. package/aqtion/frontend/assets/layout/styles/theme/theme-light/green/theme.css +7341 -0
  1216. package/aqtion/frontend/assets/layout/styles/theme/theme-light/green/theme.scss +12 -0
  1217. package/aqtion/frontend/assets/layout/styles/theme/theme-light/indigo/theme.css +7341 -0
  1218. package/aqtion/frontend/assets/layout/styles/theme/theme-light/indigo/theme.scss +12 -0
  1219. package/aqtion/frontend/assets/layout/styles/theme/theme-light/lime/theme.css +7341 -0
  1220. package/aqtion/frontend/assets/layout/styles/theme/theme-light/lime/theme.scss +12 -0
  1221. package/aqtion/frontend/assets/layout/styles/theme/theme-light/orange/theme.css +7341 -0
  1222. package/aqtion/frontend/assets/layout/styles/theme/theme-light/orange/theme.scss +12 -0
  1223. package/aqtion/frontend/assets/layout/styles/theme/theme-light/pink/theme.css +7341 -0
  1224. package/aqtion/frontend/assets/layout/styles/theme/theme-light/pink/theme.scss +12 -0
  1225. package/aqtion/frontend/assets/layout/styles/theme/theme-light/purple/theme.css +7341 -0
  1226. package/aqtion/frontend/assets/layout/styles/theme/theme-light/purple/theme.scss +12 -0
  1227. package/aqtion/frontend/assets/layout/styles/theme/theme-light/yellow/theme.css +7341 -0
  1228. package/aqtion/frontend/assets/layout/styles/theme/theme-light/yellow/theme.scss +12 -0
  1229. package/aqtion/frontend/environments/environment.ci.ts +13 -0
  1230. package/aqtion/frontend/environments/environment.dev.ts +12 -0
  1231. package/aqtion/frontend/environments/environment.prod.ts +13 -0
  1232. package/aqtion/frontend/environments/environment.ts +3 -0
  1233. package/aqtion/frontend/index.dev.html +33 -0
  1234. package/aqtion/frontend/index.prod.html +32 -0
  1235. package/aqtion/frontend/layout/api/menuchangeevent.ts +4 -0
  1236. package/aqtion/frontend/layout/api/tabcloseevent.ts +6 -0
  1237. package/aqtion/frontend/layout/app.breadcrumb.component.html +14 -0
  1238. package/aqtion/frontend/layout/app.breadcrumb.component.ts +48 -0
  1239. package/aqtion/frontend/layout/app.footer.component.html +20 -0
  1240. package/aqtion/frontend/layout/app.footer.component.ts +23 -0
  1241. package/aqtion/frontend/layout/app.menu.component.html +3 -0
  1242. package/aqtion/frontend/layout/app.menu.service.ts +23 -0
  1243. package/aqtion/frontend/layout/app.menuitem.component.ts +310 -0
  1244. package/aqtion/frontend/layout/app.sidebar.component.html +5 -0
  1245. package/aqtion/frontend/layout/app.sidebar.component.ts +13 -0
  1246. package/aqtion/frontend/layout/app.topbar.component.html +72 -0
  1247. package/aqtion/frontend/layout/app.topbar.component.ts +73 -0
  1248. package/aqtion/frontend/layout/auto-unsubscribe.decorator.ts +21 -0
  1249. package/aqtion/frontend/layout/common/err-403/err-403.component.html +24 -0
  1250. package/aqtion/frontend/layout/common/err-403/err-403.component.scss +340 -0
  1251. package/aqtion/frontend/layout/common/err-403/err-403.ts +19 -0
  1252. package/aqtion/frontend/layout/common/err-404/err-404.component.html +27 -0
  1253. package/aqtion/frontend/layout/common/err-404/err-404.component.scss +38 -0
  1254. package/aqtion/frontend/layout/common/err-404/err-404.ts +19 -0
  1255. package/aqtion/frontend/layout/common/err-500/err-500.component.html +10 -0
  1256. package/aqtion/frontend/layout/common/err-500/err-500.component.scss +44 -0
  1257. package/aqtion/frontend/layout/common/err-500/err-500.ts +37 -0
  1258. package/aqtion/frontend/layout/common/work-in-progress/work-in-progress.component.html +1 -0
  1259. package/aqtion/frontend/layout/common/work-in-progress/work-in-progress.component.scss +8 -0
  1260. package/aqtion/frontend/layout/common/work-in-progress/work-in-progress.component.ts +14 -0
  1261. package/aqtion/frontend/layout/config/app.config.component.html +86 -0
  1262. package/aqtion/frontend/layout/config/app.config.component.scss +0 -0
  1263. package/aqtion/frontend/layout/config/app.config.component.ts +241 -0
  1264. package/aqtion/frontend/layout/config/config.module.ts +27 -0
  1265. package/aqtion/frontend/layout/error.handler.ts +16 -0
  1266. package/aqtion/frontend/layout/main/main.component.html +15 -0
  1267. package/aqtion/frontend/layout/main/main.component.ts +186 -0
  1268. package/aqtion/frontend/layout/main.module.ts +45 -0
  1269. package/aqtion/frontend/layout/service/app.layout.service.ts +123 -0
  1270. package/aqtion/frontend/layout/service/healthCheck.service.ts +35 -0
  1271. package/aqtion/frontend/layout/shared/components/app.menu.component.ts +69 -0
  1272. package/aqtion/frontend/layout/shared/components/auth/accessdenied/accessdenied-routing.module.ts +12 -0
  1273. package/aqtion/frontend/layout/shared/components/auth/accessdenied/accessdenied.component.html +10 -0
  1274. package/aqtion/frontend/layout/shared/components/auth/accessdenied/accessdenied.component.ts +7 -0
  1275. package/aqtion/frontend/layout/shared/components/auth/accessdenied/accessdenied.module.ts +17 -0
  1276. package/aqtion/frontend/layout/shared/components/auth/auth-routing.module.ts +14 -0
  1277. package/aqtion/frontend/layout/shared/components/auth/auth.module.ts +13 -0
  1278. package/aqtion/frontend/layout/shared/components/auth/error/error-routing.module.ts +12 -0
  1279. package/aqtion/frontend/layout/shared/components/auth/error/error.component.html +10 -0
  1280. package/aqtion/frontend/layout/shared/components/auth/error/error.component.ts +7 -0
  1281. package/aqtion/frontend/layout/shared/components/auth/error/error.module.ts +12 -0
  1282. package/aqtion/frontend/layout/shared/components/auth/login/login-routing.module.ts +12 -0
  1283. package/aqtion/frontend/layout/shared/components/auth/login/login.component.html +15 -0
  1284. package/aqtion/frontend/layout/shared/components/auth/login/login.component.ts +47 -0
  1285. package/aqtion/frontend/layout/shared/components/auth/login/login.module.ts +21 -0
  1286. package/aqtion/frontend/layout/shared/components/auth/logout/logout/logout.component.html +8 -0
  1287. package/aqtion/frontend/layout/shared/components/auth/logout/logout/logout.component.scss +21 -0
  1288. package/aqtion/frontend/layout/shared/components/auth/logout/logout/logout.component.ts +15 -0
  1289. package/aqtion/frontend/layout/shared/components/auth/logout/logout.module.ts +26 -0
  1290. package/aqtion/frontend/layout/shared/components/code/code.component.ts +17 -0
  1291. package/aqtion/frontend/layout/shared/components/indic/indic.component.html +8 -0
  1292. package/aqtion/frontend/layout/shared/components/indic/indic.component.scss +0 -0
  1293. package/aqtion/frontend/layout/shared/components/indic/indic.component.ts +60 -0
  1294. package/aqtion/frontend/layout/shared/components/lookup-input/lookup-input.component.html +70 -0
  1295. package/aqtion/frontend/layout/shared/components/lookup-input/lookup-input.component.scss +0 -0
  1296. package/aqtion/frontend/layout/shared/components/lookup-input/lookup-input.component.ts +121 -0
  1297. package/aqtion/frontend/layout/shared/components/notfound/notfound-routing.module.ts +12 -0
  1298. package/aqtion/frontend/layout/shared/components/notfound/notfound.component.html +42 -0
  1299. package/aqtion/frontend/layout/shared/components/notfound/notfound.component.ts +7 -0
  1300. package/aqtion/frontend/layout/shared/components/notfound/notfound.module.ts +12 -0
  1301. package/aqtion/frontend/layout/shared/constants/dateFormat.constants.ts +1 -0
  1302. package/aqtion/frontend/layout/shared/constants/pagination.constants.ts +1 -0
  1303. package/aqtion/frontend/layout/shared/core/config/application-config.service.ts +34 -0
  1304. package/aqtion/frontend/layout/shared/core/config/db-config.service.ts +20 -0
  1305. package/aqtion/frontend/layout/shared/core/guard/can-modify.guard.ts +51 -0
  1306. package/aqtion/frontend/layout/shared/core/guard/login.guard.ts +24 -0
  1307. package/aqtion/frontend/layout/shared/core/guard/ui.guard.ts +94 -0
  1308. package/aqtion/frontend/layout/shared/core/interceptor/handle-req.interceptor.ts +31 -0
  1309. package/aqtion/frontend/layout/shared/core/interceptor/index.ts +10 -0
  1310. package/aqtion/frontend/layout/shared/core/request/pageable.model.ts +5 -0
  1311. package/aqtion/frontend/layout/shared/core/request/request-util.ts +21 -0
  1312. package/aqtion/frontend/layout/shared/core/resolver/accueil.resolver.ts +19 -0
  1313. package/aqtion/frontend/layout/shared/core/storage/MyLocalStorageService.ts +22 -0
  1314. package/aqtion/frontend/layout/shared/core/storage/MyStorageService.ts +17 -0
  1315. package/aqtion/frontend/layout/shared/dev/dev-dashboard/dev-dashboard.component.html +30 -0
  1316. package/aqtion/frontend/layout/shared/dev/dev-dashboard/dev-dashboard.component.scss +82 -0
  1317. package/aqtion/frontend/layout/shared/dev/dev-dashboard/dev-dashboard.component.ts +29 -0
  1318. package/aqtion/frontend/layout/shared/dev/dev-routing.module.ts +19 -0
  1319. package/aqtion/frontend/layout/shared/dev/dev.module.ts +76 -0
  1320. package/aqtion/frontend/layout/shared/entities/claims.model.ts +9 -0
  1321. package/aqtion/frontend/layout/shared/entities/user.model.ts +9 -0
  1322. package/aqtion/frontend/layout/shared/i18n/fr.json +74 -0
  1323. package/aqtion/frontend/layout/shared/service/dev.service.ts +16 -0
  1324. package/aqtion/frontend/layout/shared/service/policy.service.ts +22 -0
  1325. package/aqtion/frontend/layout/shared/service/user.service.ts +71 -0
  1326. package/aqtion/frontend/layout/shared/shared.module.ts +11 -0
  1327. package/aqtion/frontend/layout/shared/utils/globals.ts +85 -0
  1328. package/aqtion/frontend/layout/shared/utils/misc.ts +31 -0
  1329. package/aqtion/frontend/main-routing.module.ts +47 -0
  1330. package/aqtion/frontend/main.ts +13 -0
  1331. package/aqtion/frontend/pages.module.ts +76 -0
  1332. package/aqtion/frontend/polyfills.ts +64 -0
  1333. package/aqtion/frontend/styles.scss +43 -0
  1334. package/aqtion/frontend/themes.scss +84 -0
  1335. package/aqtion/kubernetes/Chart.yaml +4 -0
  1336. package/aqtion/kubernetes/config/values.yaml +22 -0
  1337. package/aqtion/kubernetes/templates/api.yaml +74 -0
  1338. package/aqtion/kubernetes/templates/app.yaml +58 -0
  1339. package/aqtion/kubernetes/templates/pgadmin.yaml +115 -0
  1340. package/aqtion/kubernetes/templates/postgres.yaml +67 -0
  1341. package/aqtion/launch.json +21 -0
  1342. package/aqtion/logo.png +0 -0
  1343. package/aqtion/nginx.conf +20 -0
  1344. package/aqtion/package-lock.json +14134 -0
  1345. package/aqtion/package.json +84 -0
  1346. package/aqtion/playwright.config.ts +77 -0
  1347. package/aqtion/pnpm-lock.yaml +9539 -0
  1348. package/aqtion/policies/roles.json +4 -0
  1349. package/aqtion/policies/ui.policy.json +4 -0
  1350. package/aqtion/pom.xml +144 -0
  1351. package/aqtion/run.sh +5 -0
  1352. package/aqtion/tests/example.spec.ts +18 -0
  1353. package/aqtion/tests-examples/demo-todo-app.spec.ts +437 -0
  1354. package/aqtion/tsconfig.app.json +9 -0
  1355. package/aqtion/tsconfig.json +39 -0
  1356. package/aqtion/tsconfig.spec.json +9 -0
  1357. package/cli/global/init.js +12 -10
  1358. package/package.json +1 -1
@@ -0,0 +1,4552 @@
1
+ function getAccess(Auth, Current, role) {
2
+ if (!Current.realm)return false;
3
+ var realmAccess = Auth.user && Auth.user['realm_access'];
4
+ if (realmAccess) {
5
+ realmAccess = realmAccess[Current.realm.realm];
6
+ if (realmAccess) {
7
+ return realmAccess.indexOf(role) >= 0;
8
+ }
9
+ }
10
+ return false;
11
+ }
12
+
13
+ function getAccessObject(Auth, Current) {
14
+ return {
15
+ get createRealm() {
16
+ return Auth.user && Auth.user.createRealm;
17
+ },
18
+
19
+ get queryUsers() {
20
+ return getAccess(Auth, Current, 'query-users') || this.viewUsers;
21
+ },
22
+
23
+ get queryGroups() {
24
+ return getAccess(Auth, Current, 'query-groups') || this.viewUsers;
25
+ },
26
+
27
+ get queryClients() {
28
+ return getAccess(Auth, Current, 'query-clients') || this.viewClients;
29
+ },
30
+
31
+ get viewRealm() {
32
+ return getAccess(Auth, Current, 'view-realm') || getAccess(Auth, Current, 'manage-realm') || this.manageRealm;
33
+ },
34
+
35
+ get viewClients() {
36
+ return getAccess(Auth, Current, 'view-clients') || getAccess(Auth, Current, 'manage-clients') || this.manageClients;
37
+ },
38
+
39
+ get viewUsers() {
40
+ return getAccess(Auth, Current, 'view-users') || getAccess(Auth, Current, 'manage-users') || this.manageClients;
41
+ },
42
+
43
+ get viewEvents() {
44
+ return getAccess(Auth, Current, 'view-events') || getAccess(Auth, Current, 'manage-events') || this.manageClients;
45
+ },
46
+
47
+ get viewIdentityProviders() {
48
+ return getAccess(Auth, Current, 'view-identity-providers') || getAccess(Auth, Current, 'manage-identity-providers') || this.manageIdentityProviders;
49
+ },
50
+
51
+ get viewAuthorization() {
52
+ return getAccess(Auth, Current, 'view-authorization') || this.manageAuthorization;
53
+ },
54
+
55
+ get manageRealm() {
56
+ return getAccess(Auth, Current, 'manage-realm');
57
+ },
58
+
59
+ get manageClients() {
60
+ return getAccess(Auth, Current, 'manage-clients');
61
+ },
62
+
63
+ get manageUsers() {
64
+ return getAccess(Auth, Current, 'manage-users');
65
+ },
66
+
67
+ get manageEvents() {
68
+ return getAccess(Auth, Current, 'manage-events');
69
+ },
70
+
71
+ get manageIdentityProviders() {
72
+ return getAccess(Auth, Current, 'manage-identity-providers');
73
+ },
74
+
75
+ get manageAuthorization() {
76
+ return getAccess(Auth, Current, 'manage-authorization');
77
+ },
78
+
79
+ get impersonation() {
80
+ return getAccess(Auth, Current, 'impersonation');
81
+ }
82
+ };
83
+ }
84
+
85
+
86
+ module.controller('GlobalCtrl', function($scope, $http, Auth, Current, $location, Notifications, ServerInfo, RealmSpecificLocalizationTexts) {
87
+ $scope.authUrl = authUrl;
88
+ $scope.resourceUrl = resourceUrl;
89
+ $scope.auth = Auth;
90
+ $scope.serverInfo = ServerInfo.get();
91
+
92
+ $scope.access = getAccessObject(Auth, Current);
93
+
94
+ $scope.$watch(function() {
95
+ return $location.path();
96
+ }, function() {
97
+ $scope.fragment = $location.path();
98
+ $scope.path = $location.path().substring(1).split("/");
99
+ });
100
+
101
+ $scope.$watch(function() {
102
+ return Current.realm;
103
+ }, function() {
104
+ if(Current.realm !== null && currentRealm !== Current.realm.id) {
105
+ currentRealm = Current.realm.id;
106
+ translateProvider.translations(locale, resourceBundle);
107
+ RealmSpecificLocalizationTexts.get({id: Current.realm.realm, locale: locale, useRealmDefaultLocaleFallback:true}, function (localizationTexts) {
108
+ translateProvider.translations(locale, localizationTexts.toJSON());
109
+ })
110
+ }
111
+ })
112
+ });
113
+
114
+ module.controller('HomeCtrl', function(Realm, Auth, Current, $location) {
115
+
116
+ Realm.query(null, function(realms) {
117
+ var realm;
118
+ if (realms.length == 1) {
119
+ realm = realms[0];
120
+ } else if (realms.length == 2) {
121
+ if (realms[0].realm == Auth.user.realm) {
122
+ realm = realms[1];
123
+ } else if (realms[1].realm == Auth.user.realm) {
124
+ realm = realms[0];
125
+ }
126
+ }
127
+ if (realm) {
128
+ Current.realms = realms;
129
+ Current.realm = realm;
130
+ var access = getAccessObject(Auth, Current);
131
+ if (access.viewRealm || access.manageRealm) {
132
+ $location.url('/realms/' + realm.realm );
133
+ } else if (access.queryClients) {
134
+ $location.url('/realms/' + realm.realm + "/clients");
135
+ } else if (access.viewIdentityProviders) {
136
+ $location.url('/realms/' + realm.realm + "/identity-provider-settings");
137
+ } else if (access.queryUsers) {
138
+ $location.url('/realms/' + realm.realm + "/users");
139
+ } else if (access.queryGroups) {
140
+ $location.url('/realms/' + realm.realm + "/groups");
141
+ } else if (access.viewEvents) {
142
+ $location.url('/realms/' + realm.realm + "/events");
143
+ }
144
+ } else {
145
+ $location.url('/realms');
146
+ }
147
+ });
148
+ });
149
+
150
+ module.controller('RealmTabCtrl', function(Dialog, $scope, Current, Realm, Notifications, $location) {
151
+ $scope.removeRealm = function() {
152
+ Dialog.confirmDelete(Current.realm.realm, 'realm', function() {
153
+ Realm.remove({ id : Current.realm.realm }, function() {
154
+ Current.realms = Realm.query();
155
+ Notifications.success("The realm has been deleted.");
156
+ $location.url("/");
157
+ });
158
+ });
159
+ };
160
+ });
161
+
162
+ module.controller('ServerInfoCtrl', function($scope, ServerInfo) {
163
+ ServerInfo.reload();
164
+
165
+ $scope.serverInfo = ServerInfo.get();
166
+
167
+ $scope.$watch($scope.serverInfo, function() {
168
+ $scope.providers = [];
169
+ for(var spi in $scope.serverInfo.providers) {
170
+ var p = angular.copy($scope.serverInfo.providers[spi]);
171
+ p.name = spi;
172
+ $scope.providers.push(p)
173
+ }
174
+ });
175
+
176
+ $scope.serverInfoReload = function() {
177
+ ServerInfo.reload();
178
+ }
179
+ });
180
+
181
+ module.controller('RealmListCtrl', function($scope, Realm, Current) {
182
+ $scope.realms = Realm.query();
183
+ Current.realms = $scope.realms;
184
+ });
185
+
186
+ module.controller('RealmDropdownCtrl', function($scope, Realm, Current, Auth, $location) {
187
+ // Current.realms = Realm.get();
188
+ $scope.current = Current;
189
+
190
+ $scope.isCreateEndpoint = function(endpoint) {
191
+ return $scope.path.length > 1 && $scope.path[0] === 'create' && $scope.path[1] === endpoint;
192
+ }
193
+
194
+ $scope.changeRealm = function(selectedRealm) {
195
+ $location.url("/realms/" + selectedRealm);
196
+ }
197
+ });
198
+
199
+ module.controller('RealmCreateCtrl', function($scope, Current, Realm, $upload, $http, $location, $route, Dialog, Notifications, Auth, $modal) {
200
+ console.log('RealmCreateCtrl');
201
+
202
+ Current.realm = null;
203
+
204
+ $scope.realm = {
205
+ enabled: true
206
+ };
207
+
208
+ $scope.changed = false;
209
+ $scope.files = [];
210
+
211
+ var oldCopy = angular.copy($scope.realm);
212
+
213
+ $scope.importFile = function($fileContent){
214
+ $scope.realm = angular.copy(JSON.parse($fileContent));
215
+ $scope.importing = true;
216
+ };
217
+
218
+ $scope.viewImportDetails = function() {
219
+ $modal.open({
220
+ templateUrl: resourceUrl + '/partials/modal/view-object.html',
221
+ controller: 'ObjectModalCtrl',
222
+ resolve: {
223
+ object: function () {
224
+ return $scope.realm;
225
+ }
226
+ }
227
+ })
228
+ };
229
+
230
+ $scope.$watch('realm', function() {
231
+ if (!angular.equals($scope.realm, oldCopy)) {
232
+ $scope.changed = true;
233
+ }
234
+ }, true);
235
+
236
+ $scope.$watch('realm.realm', function() {
237
+ $scope.realm.id = $scope.realm.realm;
238
+ }, true);
239
+
240
+ $scope.save = function() {
241
+ var realmCopy = angular.copy($scope.realm);
242
+ Realm.create(realmCopy, function() {
243
+ Notifications.success("The realm has been created.");
244
+
245
+ Auth.refreshPermissions(function() {
246
+ $scope.$apply(function() {
247
+ $location.url("/realms/" + realmCopy.realm);
248
+ });
249
+ });
250
+ });
251
+ };
252
+
253
+ $scope.cancel = function() {
254
+ $location.url("/");
255
+ };
256
+
257
+ $scope.reset = function() {
258
+ $route.reload();
259
+ }
260
+ });
261
+
262
+ module.controller('ObjectModalCtrl', function($scope, object) {
263
+ $scope.object = object;
264
+ });
265
+
266
+ module.controller('RealmDetailCtrl', function($scope, Current, Realm, realm, serverInfo, $http, $location, $window, Dialog, Notifications, Auth) {
267
+ $scope.createRealm = !realm.realm;
268
+ $scope.serverInfo = serverInfo;
269
+ $scope.realmName = realm.realm;
270
+ $scope.disableRename = realm.realm == masterRealm;
271
+ $scope.authServerUrl = authServerUrl;
272
+
273
+ if (Current.realm == null || Current.realm.realm != realm.realm) {
274
+ for (var i = 0; i < Current.realms.length; i++) {
275
+ if (realm.realm == Current.realms[i].realm) {
276
+ Current.realm = Current.realms[i];
277
+ break;
278
+ }
279
+ }
280
+ }
281
+ for (var i = 0; i < Current.realms.length; i++) {
282
+ if (Current.realms[i].realm == realm.realm) {
283
+ Current.realm = Current.realms[i];
284
+ }
285
+ }
286
+ $scope.realm = angular.copy(realm);
287
+
288
+ if ($scope.realm.attributes != null) {
289
+ $scope.realm.attributes['userProfileEnabled'] = $scope.realm.attributes['userProfileEnabled'] == 'true';
290
+ }
291
+
292
+ var oldCopy = angular.copy($scope.realm);
293
+ $scope.realmCopy = oldCopy;
294
+
295
+ $scope.changed = $scope.create;
296
+
297
+ $scope.$watch('realm', function() {
298
+ if (!angular.equals($scope.realm, oldCopy)) {
299
+ $scope.changed = true;
300
+ }
301
+ }, true);
302
+ $scope.$watch('realmName', function() {
303
+ if (!angular.equals($scope.realmName, oldCopy.realm)) {
304
+ $scope.changed = true;
305
+ }
306
+ }, true);
307
+
308
+ $scope.save = function() {
309
+ var realmCopy = angular.copy($scope.realm);
310
+ realmCopy.realm = $scope.realmName;
311
+ $scope.changed = false;
312
+ var nameChanged = !angular.equals($scope.realmName, oldCopy.realm);
313
+ var oldName = oldCopy.realm;
314
+ Realm.update({ id : oldCopy.realm}, realmCopy, function () {
315
+ var data = Realm.query(function () {
316
+ Current.realms = data;
317
+ for (var i = 0; i < Current.realms.length; i++) {
318
+ if (Current.realms[i].realm == realmCopy.realm) {
319
+ Current.realm = Current.realms[i];
320
+ oldCopy = angular.copy($scope.realm);
321
+ $scope.realmCopy = oldCopy;
322
+ }
323
+ }
324
+ });
325
+
326
+ if (nameChanged) {
327
+ console.debug(Auth);
328
+ console.debug(Auth.authz.tokenParsed.iss);
329
+
330
+ if (Auth.authz.tokenParsed.iss.endsWith(masterRealm)) {
331
+ Auth.refreshPermissions(function () {
332
+ Auth.refreshPermissions(function () {
333
+ Notifications.success("Your changes have been saved to the realm.");
334
+ $scope.$apply(function () {
335
+ $location.url("/realms/" + realmCopy.realm);
336
+ });
337
+ });
338
+ });
339
+ } else {
340
+ delete Auth.authz.token;
341
+ delete Auth.authz.refreshToken;
342
+
343
+ var newLocation = $window.location.href.replace('/' + oldName + '/', '/' + realmCopy.realm + '/')
344
+ .replace('/realms/' + oldName, '/realms/' + realmCopy.realm);
345
+ window.location.replace(newLocation);
346
+ }
347
+ } else {
348
+ $location.url("/realms/" + realmCopy.realm);
349
+ Notifications.success("Your changes have been saved to the realm.");
350
+ }
351
+ });
352
+ };
353
+
354
+ $scope.reset = function() {
355
+ $scope.realm = angular.copy(oldCopy);
356
+ $scope.changed = false;
357
+ };
358
+
359
+ $scope.cancel = function() {
360
+ window.history.back();
361
+ };
362
+ });
363
+
364
+ function genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, url, saveCallback, resetCallback) {
365
+ $scope.realm = angular.copy(realm);
366
+ $scope.serverInfo = serverInfo;
367
+ $scope.registrationAllowed = $scope.realm.registrationAllowed;
368
+
369
+ var oldCopy = angular.copy($scope.realm);
370
+
371
+ $scope.changed = false;
372
+
373
+ $scope.$watch('realm', function() {
374
+ if (!angular.equals($scope.realm, oldCopy)) {
375
+ $scope.changed = true;
376
+ }
377
+ }, true);
378
+
379
+ $scope.save = function() {
380
+ if (saveCallback) {
381
+ saveCallback();
382
+ }
383
+ var realmCopy = angular.copy($scope.realm);
384
+ console.log('updating realm...');
385
+ $scope.changed = false;
386
+ console.log('oldCopy.realm - ' + oldCopy.realm);
387
+ Realm.update({ id : oldCopy.realm}, realmCopy, function () {
388
+ $route.reload();
389
+ Notifications.success("Your changes have been saved to the realm.");
390
+ $scope.registrationAllowed = $scope.realm.registrationAllowed;
391
+ });
392
+ };
393
+
394
+ $scope.reset = function() {
395
+ $scope.realm = angular.copy(oldCopy);
396
+ if (resetCallback) {
397
+ resetCallback();
398
+ }
399
+ $scope.changed = false;
400
+ };
401
+
402
+ $scope.cancel = function() {
403
+ $route.reload();
404
+ };
405
+
406
+ }
407
+
408
+ module.controller('DefenseHeadersCtrl', function($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications) {
409
+ genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, "/realms/" + realm.realm + "/defense/headers");
410
+ });
411
+
412
+ module.controller('RealmLoginSettingsCtrl', function($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications) {
413
+ // KEYCLOAK-5474: Make sure duplicateEmailsAllowed is disabled if loginWithEmailAllowed
414
+ $scope.$watch('realm.loginWithEmailAllowed', function() {
415
+ if ($scope.realm.loginWithEmailAllowed) {
416
+ $scope.realm.duplicateEmailsAllowed = false;
417
+ }
418
+ });
419
+
420
+ var resetCallback = function() {
421
+ try {
422
+ $scope.acrLoaMap = JSON.parse(realm.attributes["acr.loa.map"] || "{}");
423
+ } catch (e) {
424
+ $scope.acrLoaMap = {};
425
+ }
426
+ }
427
+ resetCallback();
428
+ var previousNewAcr = undefined;
429
+ var previousNewLoa = undefined;
430
+
431
+ $scope.$watch('newAcr', function() {
432
+ var changed = $scope.newAcr != previousNewAcr;
433
+ if (changed) {
434
+ previousNewAcr = $scope.newAcr;
435
+ $scope.changed = true;
436
+ }
437
+ }, true);
438
+ $scope.$watch('newLoa', function() {
439
+ var changed = $scope.newLoa != previousNewLoa;
440
+ if (changed) {
441
+ previousNewLoa = $scope.newLoa;
442
+ $scope.changed = true;
443
+ }
444
+ }, true);
445
+ $scope.deleteAcrLoaMapping = function(acr) {
446
+ delete $scope.acrLoaMap[acr];
447
+ $scope.changed = true;
448
+ updateRealmAcrAttribute();
449
+ }
450
+ $scope.checkAddAcrLoaMapping = function() {
451
+ if ($scope.newAcr && $scope.newAcr.length > 0 && $scope.newLoa && $scope.newLoa.length > 0 && $scope.newLoa.match(/^[0-9]+$/)) {
452
+ console.log("Adding acrLoaMapping: " + $scope.newLoa + " : " + $scope.newAcr);
453
+ $scope.acrLoaMap[$scope.newAcr] = $scope.newLoa;
454
+ $scope.newAcr = $scope.newLoa = "";
455
+ $scope.changed = true;
456
+ updateRealmAcrAttribute();
457
+ }
458
+ }
459
+
460
+ function updateRealmAcrAttribute() {
461
+ var acrLoaMapStr = JSON.stringify($scope.acrLoaMap);
462
+ console.log("Updating realm acr.loa.map attribute: " + acrLoaMapStr);
463
+ $scope.realm.attributes["acr.loa.map"] = acrLoaMapStr;
464
+ }
465
+
466
+ genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, "/realms/" + realm.realm + "/login-settings", $scope.checkAddAcrLoaMapping, resetCallback);
467
+ });
468
+
469
+ module.controller('RealmOtpPolicyCtrl', function($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications) {
470
+ $scope.optionsDigits = [ 6, 8 ];
471
+
472
+ genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, "/realms/" + realm.realm + "/authentication/otp-policy");
473
+ });
474
+
475
+ module.controller('RealmWebAuthnPolicyCtrl', function ($scope, Current, Realm, realm, serverInfo, $http, $route, $location, Dialog, Notifications) {
476
+
477
+ $scope.deleteAcceptableAaguid = function(index) {
478
+ $scope.realm.webAuthnPolicyAcceptableAaguids.splice(index, 1);
479
+ };
480
+
481
+ $scope.addAcceptableAaguid = function() {
482
+ $scope.realm.webAuthnPolicyAcceptableAaguids.push($scope.newAcceptableAaguid);
483
+ $scope.newAcceptableAaguid = "";
484
+ };
485
+
486
+ // Just for case the user fill particular URL with disabled WebAuthn feature.
487
+ $scope.redirectIfWebAuthnDisabled = function () {
488
+ if (!serverInfo.featureEnabled('WEB_AUTHN')) {
489
+ $location.url("/realms/" + $scope.realm.realm + "/authentication");
490
+ }
491
+ };
492
+
493
+ genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, "/realms/" + realm.realm + "/authentication/webauthn-policy");
494
+ });
495
+
496
+ module.controller('RealmWebAuthnPasswordlessPolicyCtrl', function ($scope, Current, Realm, realm, serverInfo, $http, $route, $location, Dialog, Notifications) {
497
+
498
+ $scope.deleteAcceptableAaguid = function(index) {
499
+ $scope.realm.webAuthnPolicyPasswordlessAcceptableAaguids.splice(index, 1);
500
+ };
501
+
502
+ $scope.addAcceptableAaguid = function() {
503
+ $scope.realm.webAuthnPolicyPasswordlessAcceptableAaguids.push($scope.newAcceptableAaguid);
504
+ $scope.newAcceptableAaguid = "";
505
+ };
506
+
507
+ // Just for case the user fill particular URL with disabled WebAuthn feature.
508
+ $scope.redirectIfWebAuthnDisabled = function () {
509
+ if (!serverInfo.featureEnabled('WEB_AUTHN')) {
510
+ $location.url("/realms/" + $scope.realm.realm + "/authentication");
511
+ }
512
+ };
513
+
514
+ genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, "/realms/" + realm.realm + "/authentication/webauthn-policy-passwordless");
515
+ });
516
+
517
+ module.controller('RealmCibaPolicyCtrl', function ($scope, Current, Realm, realm, serverInfo, $http, $route, $location, Dialog, Notifications) {
518
+
519
+ genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, "/realms/" + realm.realm + "/authentication/ciba-policy");
520
+ });
521
+
522
+ module.controller('RealmThemeCtrl', function($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications) {
523
+ genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, "/realms/" + realm.realm + "/theme-settings");
524
+
525
+ $scope.supportedLocalesOptions = {
526
+ 'multiple' : true,
527
+ 'simple_tags' : true,
528
+ 'tags' : []
529
+ };
530
+
531
+ updateSupported();
532
+
533
+ function localeForTheme(type, name) {
534
+ name = name || 'base';
535
+ for (var i = 0; i < serverInfo.themes[type].length; i++) {
536
+ if (serverInfo.themes[type][i].name == name) {
537
+ return serverInfo.themes[type][i].locales || [];
538
+ }
539
+ }
540
+ return [];
541
+ }
542
+
543
+ function updateSupported() {
544
+ if ($scope.realm.internationalizationEnabled) {
545
+ var accountLocales = localeForTheme('account', $scope.realm.accountTheme);
546
+ var loginLocales = localeForTheme('login', $scope.realm.loginTheme);
547
+ var emailLocales = localeForTheme('email', $scope.realm.emailTheme);
548
+
549
+ var supportedLocales = [];
550
+ for (var i = 0; i < accountLocales.length; i++) {
551
+ var l = accountLocales[i];
552
+ if (loginLocales.indexOf(l) >= 0 && emailLocales.indexOf(l) >= 0) {
553
+ supportedLocales.push(l);
554
+ }
555
+ }
556
+
557
+ $scope.supportedLocalesOptions.tags = supportedLocales;
558
+
559
+ if (!$scope.realm.supportedLocales) {
560
+ $scope.realm.supportedLocales = supportedLocales;
561
+ } else {
562
+ for (var i = 0; i < $scope.realm.supportedLocales.length; i++) {
563
+ if (supportedLocales.indexOf($scope.realm.supportedLocales[i]) == -1) {
564
+ $scope.realm.supportedLocales = supportedLocales;
565
+ }
566
+ }
567
+ }
568
+
569
+ if (!$scope.realm.defaultLocale || supportedLocales.indexOf($scope.realm.defaultLocale) == -1) {
570
+ $scope.realm.defaultLocale = 'en';
571
+ }
572
+ }
573
+ }
574
+
575
+ $scope.$watch('realm.loginTheme', updateSupported);
576
+ $scope.$watch('realm.accountTheme', updateSupported);
577
+ $scope.$watch('realm.emailTheme', updateSupported);
578
+ $scope.$watch('realm.internationalizationEnabled', updateSupported);
579
+ });
580
+
581
+ module.controller('RealmLocalizationCtrl', function($scope, Current, $location, Realm, realm, serverInfo, Notifications, RealmSpecificLocales, realmSpecificLocales, RealmSpecificLocalizationTexts, RealmSpecificLocalizationText, Dialog, $translate){
582
+ $scope.realm = realm;
583
+ $scope.realmSpecificLocales = realmSpecificLocales;
584
+ $scope.newLocale = null;
585
+ $scope.selectedRealmSpecificLocales = null;
586
+ $scope.localizationTexts = null;
587
+
588
+ $scope.createLocale = function() {
589
+ if(!$scope.newLocale) {
590
+ Notifications.error($translate.instant('missing-locale'));
591
+ return;
592
+ }
593
+ $scope.realmSpecificLocales.push($scope.newLocale)
594
+ $scope.selectedRealmSpecificLocales = $scope.newLocale;
595
+ $scope.newLocale = null;
596
+ $location.url('/create/localization/' + realm.realm + '/' + $scope.selectedRealmSpecificLocales);
597
+ }
598
+
599
+ $scope.$watch(function() {
600
+ return $scope.selectedRealmSpecificLocales;
601
+ }, function() {
602
+ if($scope.selectedRealmSpecificLocales != null) {
603
+ $scope.updateRealmSpecificLocalizationTexts();
604
+ }
605
+ })
606
+
607
+ $scope.updateRealmSpecificLocales = function() {
608
+ RealmSpecificLocales.get({id: realm.realm}, function (updated) {
609
+ $scope.realmSpecificLocales = updated;
610
+ })
611
+ }
612
+
613
+ $scope.updateRealmSpecificLocalizationTexts = function() {
614
+ RealmSpecificLocalizationTexts.get({id: realm.realm, locale: $scope.selectedRealmSpecificLocales }, function (updated) {
615
+ $scope.localizationTexts = getSortedArrayByKeyFromObject(updated);
616
+ })
617
+ }
618
+
619
+ function getSortedArrayByKeyFromObject(object) {
620
+ const keys = Object.keys(object).sort(function (a, b) {
621
+ return a.localeCompare(b, locale);
622
+ });
623
+ return keys.reduce(function (result, key) {
624
+ const value = object[key];
625
+ if (typeof value !== 'string') {
626
+ return result;
627
+ }
628
+ return result.concat([[key, value]]);
629
+ }, []);
630
+ }
631
+
632
+ $scope.removeLocalizationText = function(key) {
633
+ Dialog.confirmDelete(key, 'localization text', function() {
634
+ RealmSpecificLocalizationText.remove({
635
+ realm: realm.realm,
636
+ locale: $scope.selectedRealmSpecificLocales,
637
+ key: key
638
+ }, function () {
639
+ $scope.updateRealmSpecificLocalizationTexts();
640
+ Notifications.success($translate.instant('localization-text.remove.success'));
641
+ });
642
+ });
643
+ }
644
+ });
645
+
646
+ module.controller('RealmLocalizationUploadCtrl', function($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, $upload, $translate){
647
+ $scope.realm = realm;
648
+ $scope.locale = null;
649
+ $scope.files = [];
650
+
651
+ $scope.onFileSelect = function($files) {
652
+ $scope.files = $files;
653
+ };
654
+
655
+ $scope.reset = function() {
656
+ $scope.locale = null;
657
+ $scope.files = null;
658
+ };
659
+
660
+ $scope.save = function() {
661
+
662
+ if(!$scope.files || $scope.files.length === 0) {
663
+ Notifications.error($translate.instant('missing-file'));
664
+ return;
665
+ }
666
+ //$files: an array of files selected, each file has name, size, and type.
667
+ for (var i = 0; i < $scope.files.length; i++) {
668
+ var $file = $scope.files[i];
669
+ $scope.upload = $upload.upload({
670
+ url: authUrl + '/admin/realms/' + realm.realm + '/localization/' + $scope.locale,
671
+ file: $file
672
+ }).then(function(response) {
673
+ $scope.reset();
674
+ Notifications.success($translate.instant('localization-file.upload.success'));
675
+ }).catch(function() {
676
+ Notifications.error($translate.instant('localization-file.upload.error'));
677
+ });
678
+ }
679
+ };
680
+
681
+ });
682
+
683
+ module.controller('RealmLocalizationDetailCtrl', function($scope, Current, $location, Realm, realm, Notifications, locale, key, RealmSpecificLocalizationText, localizationText, $translate){
684
+ $scope.realm = realm;
685
+ $scope.locale = locale;
686
+ $scope.key = key;
687
+ $scope.value = ((localizationText)? localizationText.content : null);
688
+
689
+ $scope.create = !key;
690
+
691
+ $scope.save = function() {
692
+ if ($scope.create) {
693
+ RealmSpecificLocalizationText.save({
694
+ realm: realm.realm,
695
+ locale: $scope.locale,
696
+ key: $scope.key
697
+ }, $scope.value, function (data, headers) {
698
+ $location.url("/realms/" + realm.realm + "/localization");
699
+ Notifications.success($translate.instant('localization-text.create.success'));
700
+ });
701
+ } else {
702
+ RealmSpecificLocalizationText.save({
703
+ realm: realm.realm,
704
+ locale: $scope.locale,
705
+ key: $scope.key
706
+ }, $scope.value, function (data, headers) {
707
+ $location.url("/realms/" + realm.realm + "/localization");
708
+ Notifications.success($translate.instant('localization-text.update.success'));
709
+ });
710
+ }
711
+ };
712
+
713
+ $scope.cancel = function () {
714
+ $location.url("/realms/" + realm.realm + "/localization");
715
+ };
716
+
717
+ });
718
+
719
+ module.controller('RealmCacheCtrl', function($scope, realm, RealmClearUserCache, RealmClearRealmCache, RealmClearKeysCache, Notifications) {
720
+ $scope.realm = angular.copy(realm);
721
+
722
+ $scope.clearUserCache = function() {
723
+ RealmClearUserCache.save({ realm: realm.realm}, function () {
724
+ Notifications.success("User cache cleared");
725
+ });
726
+ }
727
+
728
+ $scope.clearRealmCache = function() {
729
+ RealmClearRealmCache.save({ realm: realm.realm}, function () {
730
+ Notifications.success("Realm cache cleared");
731
+ });
732
+ }
733
+
734
+ $scope.clearKeysCache = function() {
735
+ RealmClearKeysCache.save({ realm: realm.realm}, function () {
736
+ Notifications.success("Public keys cache cleared");
737
+ });
738
+ }
739
+
740
+
741
+ });
742
+
743
+ module.controller('RealmPasswordPolicyCtrl', function($scope, Realm, realm, $http, $location, $route, Dialog, Notifications, serverInfo) {
744
+ var parse = function(policyString) {
745
+ var policies = [];
746
+ if (!policyString || policyString.length == 0){
747
+ return policies;
748
+ }
749
+
750
+ var policyArray = policyString.split(" and ");
751
+
752
+ for (var i = 0; i < policyArray.length; i ++){
753
+ var policyToken = policyArray[i];
754
+ var id;
755
+ var value;
756
+ if (policyToken.indexOf('(') == -1) {
757
+ id = policyToken.trim();
758
+ value = null;
759
+ } else {
760
+ id = policyToken.substring(0, policyToken.indexOf('('));
761
+ value = policyToken.substring(policyToken.indexOf('(') + 1, policyToken.lastIndexOf(')')).trim();
762
+ }
763
+
764
+ for (var j = 0; j < serverInfo.passwordPolicies.length; j++) {
765
+ if (serverInfo.passwordPolicies[j].id == id) {
766
+ // clone
767
+ var p = JSON.parse(JSON.stringify(serverInfo.passwordPolicies[j]));
768
+
769
+ p.value = value && value || p.defaultValue;
770
+ policies.push(p);
771
+ }
772
+ }
773
+ }
774
+ return policies;
775
+ };
776
+
777
+ var toString = function(policies) {
778
+ if (!policies || policies.length == 0) {
779
+ return "";
780
+ }
781
+ var policyString = "";
782
+ for (var i = 0; i < policies.length; i++) {
783
+ policyString += policies[i].id + '(' + policies[i].value + ')';
784
+ if (i != policies.length - 1) {
785
+ policyString += ' and ';
786
+ }
787
+ }
788
+ return policyString;
789
+ }
790
+
791
+ $scope.realm = realm;
792
+ $scope.serverInfo = serverInfo;
793
+
794
+ $scope.changed = false;
795
+ console.log(JSON.stringify(parse(realm.passwordPolicy)));
796
+ $scope.policy = parse(realm.passwordPolicy);
797
+ var oldCopy = angular.copy($scope.policy);
798
+
799
+ $scope.$watch('policy', function() {
800
+ $scope.changed = ! angular.equals($scope.policy, oldCopy);
801
+ }, true);
802
+
803
+ $scope.addPolicy = function(policy){
804
+ policy.value = policy.defaultValue;
805
+ if (!$scope.policy) {
806
+ $scope.policy = [];
807
+ }
808
+ $scope.policy.push(policy);
809
+ }
810
+
811
+ $scope.removePolicy = function(index){
812
+ $scope.policy.splice(index, 1);
813
+ }
814
+
815
+ $scope.save = function() {
816
+ $scope.realm.passwordPolicy = toString($scope.policy);
817
+ console.log($scope.realm.passwordPolicy);
818
+
819
+ Realm.update($scope.realm, function () {
820
+ $route.reload();
821
+ Notifications.success("Your changes have been saved to the realm.");
822
+ });
823
+ };
824
+
825
+ $scope.reset = function() {
826
+ $route.reload();
827
+ };
828
+ });
829
+
830
+ module.controller('RealmDefaultRolesCtrl', function ($scope, $route, realm, roles, Notifications, ClientRole, Client, RoleRealmComposites, RoleClientComposites, ComponentUtils, $http) {
831
+
832
+ console.log('RealmDefaultRolesCtrl');
833
+
834
+ $scope.realm = realm;
835
+ $scope.availableRealmRoles = angular.copy(roles);
836
+ $scope.selectedRealmRoles = [];
837
+ $scope.selectedRealmDefRoles = [];
838
+
839
+ $scope.availableClientRoles = [];
840
+ $scope.selectedClientRoles = [];
841
+ $scope.selectedClientDefRoles = [];
842
+
843
+ for (var j = 0; j < $scope.availableRealmRoles.length; j++) {
844
+ if ($scope.availableRealmRoles[j].id === realm.defaultRole.id) {
845
+ var realmRole = $scope.availableRealmRoles[j];
846
+ var idx = $scope.availableRealmRoles.indexOf(realmRole);
847
+ $scope.availableRealmRoles.splice(idx, 1);
848
+ break;
849
+ }
850
+ }
851
+
852
+ $scope.realmMappings = RoleRealmComposites.query({realm : realm.realm, role : realm.defaultRole.id}, function(){
853
+ for (var i = 0; i < $scope.realmMappings.length; i++) {
854
+ var role = $scope.realmMappings[i];
855
+ for (var j = 0; j < $scope.availableRealmRoles.length; j++) {
856
+ var realmRole = $scope.availableRealmRoles[j];
857
+ if (realmRole.id === role.id) {
858
+ var idx = $scope.availableRealmRoles.indexOf(realmRole);
859
+ if (idx !== -1) {
860
+ $scope.availableRealmRoles.splice(idx, 1);
861
+ break;
862
+ }
863
+ }
864
+ }
865
+ }
866
+ });
867
+
868
+ $scope.addRealmDefaultRole = function () {
869
+
870
+ $scope.selectedRealmRolesToAdd = JSON.parse('[' + $scope.selectedRealmRoles + ']');
871
+ $http.post(authUrl + '/admin/realms/' + realm.realm + '/roles-by-id/' + realm.defaultRole.id + '/composites',
872
+ $scope.selectedRealmRolesToAdd).then(function() {
873
+ // Remove selected roles from the Available roles and add them to realm default roles (move from left to right).
874
+ for (var i = 0; i < $scope.selectedRealmRolesToAdd.length; i++) {
875
+ var selectedRole = $scope.selectedRealmRolesToAdd[i];
876
+ var index = ComponentUtils.findIndexById($scope.availableRealmRoles, selectedRole.id);
877
+ if (index > -1) {
878
+ $scope.availableRealmRoles.splice(index, 1);
879
+ $scope.realmMappings.push(selectedRole);
880
+ }
881
+ }
882
+
883
+ $scope.selectedRealmRoles = [];
884
+ $scope.selectedRealmRolesToAdd = [];
885
+ Notifications.success("Default roles updated.");
886
+ });
887
+ };
888
+
889
+ $scope.deleteRealmDefaultRole = function () {
890
+
891
+ $scope.selectedClientRolesToRemove = JSON.parse('[' + $scope.selectedRealmDefRoles + ']');
892
+ $http.delete(authUrl + '/admin/realms/' + realm.realm + '/roles-by-id/' + realm.defaultRole.id + '/composites',
893
+ {data : $scope.selectedClientRolesToRemove, headers : {"content-type" : "application/json"}}).then(function() {
894
+ // Remove selected roles from the realm default roles and add them to available roles (move from right to left).
895
+ for (var i = 0; i < $scope.selectedClientRolesToRemove.length; i++) {
896
+ var selectedRole = $scope.selectedClientRolesToRemove[i];
897
+ var index = ComponentUtils.findIndexById($scope.realmMappings, selectedRole.id);
898
+ if (index > -1) {
899
+ $scope.realmMappings.splice(index, 1);
900
+ $scope.availableRealmRoles.push(selectedRole);
901
+ }
902
+ }
903
+
904
+ $scope.selectedRealmDefRoles = [];
905
+ $scope.selectedClientRolesToRemove = [];
906
+ Notifications.success("Default roles updated.");
907
+ });
908
+ };
909
+
910
+ $scope.changeClient = function (client) {
911
+ if (!client || !client.id) {
912
+ $scope.selectedClient = null;
913
+ return;
914
+ }
915
+ $scope.selectedClient = client;
916
+ $scope.selectedClientRoles = [];
917
+ $scope.selectedClientDefRoles = [];
918
+
919
+ // Populate available roles for selected client
920
+ if ($scope.selectedClient) {
921
+ $scope.availableClientRoles = ClientRole.query({realm: realm.realm, client: client.id}, function () {
922
+ $scope.clientMappings = RoleClientComposites.query({realm : realm.realm, role : realm.defaultRole.id, client : client.id}, function(){
923
+ for (var i = 0; i < $scope.clientMappings.length; i++) {
924
+ var role = $scope.clientMappings[i];
925
+ for (var j = 0; j < $scope.availableClientRoles.length; j++) {
926
+ var clientRole = $scope.availableClientRoles[j];
927
+ if (clientRole.id === role.id) {
928
+ var idx = $scope.availableClientRoles.indexOf(clientRole);
929
+ if (idx !== -1) {
930
+ $scope.availableClientRoles.splice(idx, 1);
931
+ break;
932
+ }
933
+ }
934
+ }
935
+ }
936
+ });
937
+ for (var j = 0; j < $scope.availableClientRoles.length; j++) {
938
+ if ($scope.availableClientRoles[j] === realm.defaultRole.id) {
939
+ var clientRole = $scope.availableClientRoles[j];
940
+ var idx = $scope.availableClientRoles.indexof(clientRole);
941
+ $scope.availableClientRoles.splice(idx, 1);
942
+ break;
943
+ }
944
+ }
945
+ });
946
+ } else {
947
+ $scope.availableClientRoles = null;
948
+ }
949
+ };
950
+
951
+ $scope.addClientDefaultRole = function () {
952
+
953
+ $scope.selectedClientRolesToAdd = JSON.parse('[' + $scope.selectedClientRoles + ']');
954
+ $http.post(authUrl + '/admin/realms/' + realm.realm + '/roles-by-id/' + realm.defaultRole.id + '/composites',
955
+ $scope.selectedClientRolesToAdd).then(function() {
956
+ // Remove selected roles from the app available roles and add them to app default roles (move from left to right).
957
+ for (var i = 0; i < $scope.selectedClientRolesToAdd.length; i++) {
958
+ var selectedRole = $scope.selectedClientRolesToAdd[i];
959
+
960
+ var index = ComponentUtils.findIndexById($scope.availableClientRoles, selectedRole.id);
961
+ if (index > -1) {
962
+ $scope.availableClientRoles.splice(index, 1);
963
+ $scope.clientMappings.push(selectedRole);
964
+ }
965
+ }
966
+
967
+ $scope.selectedClientRoles = [];
968
+ $scope.selectedClientRolesToAdd = [];
969
+ Notifications.success("Default roles updated.");
970
+ });
971
+ };
972
+
973
+ $scope.rmClientDefaultRole = function () {
974
+
975
+ $scope.selectedClientRolesToRemove = JSON.parse('[' + $scope.selectedClientDefRoles + ']');
976
+ $http.delete(authUrl + '/admin/realms/' + realm.realm + '/roles-by-id/' + realm.defaultRole.id + '/composites',
977
+ {data : $scope.selectedClientRolesToRemove, headers : {"content-type" : "application/json"}}).then(function() {
978
+ // Remove selected roles from the realm default roles and add them to available roles (move from right to left).
979
+ for (var i = 0; i < $scope.selectedClientRolesToRemove.length; i++) {
980
+ var selectedRole = $scope.selectedClientRolesToRemove[i];
981
+ var index = ComponentUtils.findIndexById($scope.clientMappings, selectedRole.id);
982
+ if (index > -1) {
983
+ $scope.clientMappings.splice(index, 1);
984
+ $scope.availableClientRoles.push(selectedRole);
985
+ }
986
+ }
987
+
988
+ $scope.selectedClientDefRoles = [];
989
+ $scope.selectedClientRolesToRemove = [];
990
+ Notifications.success("Default roles updated.");
991
+ });
992
+ };
993
+
994
+ clientSelectControl($scope, $route.current.params.realm, Client);
995
+ });
996
+
997
+
998
+
999
+ module.controller('IdentityProviderTabCtrl', function(Dialog, $scope, Current, Notifications, $location) {
1000
+ $scope.removeIdentityProvider = function() {
1001
+ Dialog.confirmDelete($scope.identityProvider.alias, 'provider', function() {
1002
+ $scope.identityProvider.$remove({
1003
+ realm : Current.realm.realm,
1004
+ alias : $scope.identityProvider.alias
1005
+ }, function() {
1006
+ $location.url("/realms/" + Current.realm.realm + "/identity-provider-settings");
1007
+ Notifications.success("The identity provider has been deleted.");
1008
+ });
1009
+ });
1010
+ };
1011
+ });
1012
+
1013
+ module.controller('RealmIdentityProviderCtrl', function($scope, $filter, $upload, $http, $route, realm, instance, providerFactory, IdentityProvider, serverInfo, authFlows, $location, Notifications, Dialog) {
1014
+ $scope.realm = angular.copy(realm);
1015
+
1016
+ $scope.initSamlProvider = function() {
1017
+ $scope.nameIdFormats = [
1018
+ {
1019
+ format: "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
1020
+ name: "Persistent"
1021
+
1022
+ },
1023
+ {
1024
+ format: "urn:oasis:names:tc:SAML:2.0:nameid-format:transient",
1025
+ name: "Transient"
1026
+ },
1027
+ {
1028
+ format: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
1029
+ name: "Email"
1030
+
1031
+ },
1032
+ {
1033
+ format: "urn:oasis:names:tc:SAML:2.0:nameid-format:kerberos",
1034
+ name: "Kerberos"
1035
+
1036
+ },
1037
+ {
1038
+ format: "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName",
1039
+ name: "X.509 Subject Name"
1040
+
1041
+ },
1042
+ {
1043
+ format: "urn:oasis:names:tc:SAML:1.1:nameid-format:WindowsDomainQualifiedName",
1044
+ name: "Windows Domain Qualified Name"
1045
+
1046
+ },
1047
+ {
1048
+ format: "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified",
1049
+ name: "Unspecified"
1050
+
1051
+ }
1052
+ ];
1053
+ $scope.signatureAlgorithms = [
1054
+ "RSA_SHA1",
1055
+ "RSA_SHA256",
1056
+ "RSA_SHA256_MGF1",
1057
+ "RSA_SHA512",
1058
+ "RSA_SHA512_MGF1",
1059
+ "DSA_SHA1"
1060
+ ];
1061
+ $scope.xmlKeyNameTranformers = [
1062
+ "NONE",
1063
+ "KEY_ID",
1064
+ "CERT_SUBJECT"
1065
+ ];
1066
+ $scope.principalTypes = [
1067
+ {
1068
+ type: "SUBJECT",
1069
+ name: "Subject NameID"
1070
+
1071
+ },
1072
+ {
1073
+ type: "ATTRIBUTE",
1074
+ name: "Attribute [Name]"
1075
+
1076
+ },
1077
+ {
1078
+ type: "FRIENDLY_ATTRIBUTE",
1079
+ name: "Attribute [Friendly Name]"
1080
+
1081
+ }
1082
+ ];
1083
+ if (instance && instance.alias) {
1084
+
1085
+ } else {
1086
+ $scope.identityProvider.config.nameIDPolicyFormat = $scope.nameIdFormats[0].format;
1087
+ $scope.identityProvider.config.principalType = $scope.principalTypes[0].type;
1088
+ $scope.identityProvider.config.signatureAlgorithm = $scope.signatureAlgorithms[1];
1089
+ $scope.identityProvider.config.xmlSigKeyInfoKeyNameTransformer = $scope.xmlKeyNameTranformers[1];
1090
+ $scope.identityProvider.config.allowCreate = 'true';
1091
+ }
1092
+ $scope.identityProvider.config.entityId = $scope.identityProvider.config.entityId || (authUrl + '/realms/' + realm.realm);
1093
+ }
1094
+
1095
+ $scope.hidePassword = true;
1096
+ $scope.fromUrl = {
1097
+ data: ''
1098
+ };
1099
+
1100
+ if (instance && instance.alias) {
1101
+ $scope.identityProvider = angular.copy(instance);
1102
+ $scope.newIdentityProvider = false;
1103
+ for (var i in serverInfo.identityProviders) {
1104
+ var provider = serverInfo.identityProviders[i];
1105
+
1106
+ if (provider.id == instance.providerId) {
1107
+ $scope.provider = provider;
1108
+ }
1109
+ }
1110
+ } else {
1111
+ $scope.identityProvider = {};
1112
+ $scope.identityProvider.config = {};
1113
+ $scope.identityProvider.alias = providerFactory.id;
1114
+ $scope.identityProvider.providerId = providerFactory.id;
1115
+
1116
+ $scope.identityProvider.enabled = true;
1117
+ $scope.identityProvider.authenticateByDefault = false;
1118
+ $scope.identityProvider.firstBrokerLoginFlowAlias = 'first broker login';
1119
+ $scope.identityProvider.config.useJwksUrl = 'true';
1120
+ $scope.identityProvider.config.syncMode = 'IMPORT';
1121
+ $scope.newIdentityProvider = true;
1122
+ }
1123
+
1124
+ $scope.changed = $scope.newIdentityProvider;
1125
+
1126
+ $scope.$watch('identityProvider', function() {
1127
+ if (!angular.equals($scope.identityProvider, instance)) {
1128
+ $scope.changed = true;
1129
+ }
1130
+ }, true);
1131
+
1132
+
1133
+ $scope.serverInfo = serverInfo;
1134
+
1135
+ $scope.allProviders = angular.copy(serverInfo.identityProviders);
1136
+
1137
+ $scope.configuredProviders = angular.copy(realm.identityProviders);
1138
+
1139
+ removeUsedSocial();
1140
+
1141
+ $scope.authFlows = [];
1142
+ for (var i=0 ; i<authFlows.length ; i++) {
1143
+ if (authFlows[i].providerId == 'basic-flow') {
1144
+ $scope.authFlows.push(authFlows[i]);
1145
+ }
1146
+ }
1147
+
1148
+ $scope.postBrokerAuthFlows = [];
1149
+ var emptyFlow = { alias: "" };
1150
+ $scope.postBrokerAuthFlows.push(emptyFlow);
1151
+ for (var i=0 ; i<$scope.authFlows.length ; i++) {
1152
+ $scope.postBrokerAuthFlows.push($scope.authFlows[i]);
1153
+ }
1154
+
1155
+ if (!$scope.identityProvider.postBrokerLoginFlowAlias) {
1156
+ $scope.identityProvider.postBrokerLoginFlowAlias = $scope.postBrokerAuthFlows[0].alias;
1157
+ }
1158
+
1159
+ $scope.$watch(function() {
1160
+ return $location.path();
1161
+ }, function() {
1162
+ $scope.path = $location.path().substring(1).split("/");
1163
+ });
1164
+
1165
+
1166
+ $scope.files = [];
1167
+ $scope.importFile = false;
1168
+ $scope.importUrl = false;
1169
+
1170
+ $scope.onFileSelect = function($files) {
1171
+ $scope.importFile = true;
1172
+ $scope.files = $files;
1173
+ };
1174
+
1175
+ $scope.clearFileSelect = function() {
1176
+ $scope.importUrl = false;
1177
+ $scope.importFile = false;
1178
+ $scope.files = null;
1179
+ };
1180
+
1181
+ var setConfig = function(data) {
1182
+ if (data["enabledFromMetadata"] !== undefined ) {
1183
+ $scope.identityProvider.enabled = data["enabledFromMetadata"] == "true";
1184
+ delete data["enabledFromMetadata"];
1185
+ }
1186
+ for (var key in data) {
1187
+ $scope.identityProvider.config[key] = data[key];
1188
+ }
1189
+
1190
+ }
1191
+
1192
+ $scope.uploadFile = function() {
1193
+ if (!$scope.identityProvider.alias) {
1194
+ Notifications.error("You must specify an alias");
1195
+ return;
1196
+ }
1197
+ var input = {
1198
+ providerId: providerFactory.id
1199
+ }
1200
+ //$files: an array of files selected, each file has name, size, and type.
1201
+ for (var i = 0; i < $scope.files.length; i++) {
1202
+ var $file = $scope.files[i];
1203
+ $scope.upload = $upload.upload({
1204
+ url: authUrl + '/admin/realms/' + realm.realm + '/identity-provider/import-config',
1205
+ // method: POST or PUT,
1206
+ // headers: {'headerKey': 'headerValue'}, withCredential: true,
1207
+ data: input,
1208
+ file: $file
1209
+ /* set file formData name for 'Content-Desposition' header. Default: 'file' */
1210
+ //fileFormDataName: myFile,
1211
+ /* customize how data is added to formData. See #40#issuecomment-28612000 for example */
1212
+ //formDataAppender: function(formData, key, val){}
1213
+ }).progress(function(evt) {
1214
+ console.log('percent: ' + parseInt(100.0 * evt.loaded / evt.total));
1215
+ }).then(function(response) {
1216
+ setConfig(response.data);
1217
+ $scope.clearFileSelect();
1218
+ Notifications.success("The IDP metadata has been loaded from file.");
1219
+ }).catch(function() {
1220
+ Notifications.error("The file can not be uploaded. Please verify the file.");
1221
+ });
1222
+ }
1223
+ };
1224
+
1225
+ $scope.importFrom = function() {
1226
+ if (!$scope.identityProvider.alias) {
1227
+ Notifications.error("You must specify an alias");
1228
+ return;
1229
+ }
1230
+ var input = {
1231
+ fromUrl: $scope.fromUrl.data,
1232
+ providerId: providerFactory.id
1233
+ }
1234
+ $http.post(authUrl + '/admin/realms/' + realm.realm + '/identity-provider/import-config', input)
1235
+ .then(function(response) {
1236
+ setConfig(response.data);
1237
+ $scope.fromUrl.data = '';
1238
+ $scope.importUrl = false;
1239
+ Notifications.success("Imported config information from url.");
1240
+ }).catch(function() {
1241
+ Notifications.error("Config can not be imported. Please verify the url.");
1242
+ });
1243
+ };
1244
+ $scope.$watch('fromUrl.data', function(newVal, oldVal){
1245
+ if ($scope.fromUrl.data && $scope.fromUrl.data.length > 0) {
1246
+ $scope.importUrl = true;
1247
+ } else{
1248
+ $scope.importUrl = false;
1249
+ }
1250
+ });
1251
+
1252
+ $scope.$watch('configuredProviders', function(configuredProviders) {
1253
+ if (configuredProviders) {
1254
+ $scope.configuredProviders = angular.copy(configuredProviders);
1255
+
1256
+ for (var j = 0; j < configuredProviders.length; j++) {
1257
+ var configProvidedId = configuredProviders[j].providerId;
1258
+
1259
+ for (var i in $scope.allProviders) {
1260
+ var provider = $scope.allProviders[i];
1261
+ if (provider.id == configProvidedId) {
1262
+ configuredProviders[j].provider = provider;
1263
+ }
1264
+ }
1265
+ }
1266
+ $scope.configuredProviders = angular.copy(configuredProviders);
1267
+ }
1268
+ }, true);
1269
+
1270
+ $scope.callbackUrl = authServerUrl + "/realms/" + realm.realm + "/broker/";
1271
+
1272
+ $scope.addProvider = function(provider) {
1273
+ $location.url("/create/identity-provider/" + realm.realm + "/" + provider.id);
1274
+ };
1275
+
1276
+ $scope.save = function() {
1277
+ if ($scope.newIdentityProvider) {
1278
+ if (!$scope.identityProvider.alias) {
1279
+ Notifications.error("You must specify an alias");
1280
+ return;
1281
+ }
1282
+ IdentityProvider.save({
1283
+ realm: $scope.realm.realm, alias: ''
1284
+ }, $scope.identityProvider, function () {
1285
+ $location.url("/realms/" + realm.realm + "/identity-provider-settings/provider/" + $scope.identityProvider.providerId + "/" + $scope.identityProvider.alias);
1286
+ Notifications.success("The " + $scope.identityProvider.alias + " provider has been created.");
1287
+ });
1288
+ } else {
1289
+ IdentityProvider.update({
1290
+ realm: $scope.realm.realm,
1291
+ alias: $scope.identityProvider.alias
1292
+ }, $scope.identityProvider, function () {
1293
+ $route.reload();
1294
+ Notifications.success("The " + $scope.identityProvider.alias + " provider has been updated.");
1295
+ });
1296
+ }
1297
+ };
1298
+
1299
+ $scope.cancel = function() {
1300
+ if ($scope.newIdentityProvider) {
1301
+ $location.url("/realms/" + realm.realm + "/identity-provider-settings");
1302
+ } else {
1303
+ $route.reload();
1304
+ }
1305
+ };
1306
+
1307
+
1308
+ $scope.reset = function() {
1309
+ $scope.identityProvider = {};
1310
+ $scope.configuredProviders = angular.copy($scope.realm.identityProviders);
1311
+ };
1312
+
1313
+ $scope.showPassword = function(flag) {
1314
+ $scope.hidePassword = flag;
1315
+ };
1316
+
1317
+ $scope.removeIdentityProvider = function(identityProvider) {
1318
+ Dialog.confirmDelete(identityProvider.alias, 'provider', function() {
1319
+ IdentityProvider.remove({
1320
+ realm : realm.realm,
1321
+ alias : identityProvider.alias
1322
+ }, function() {
1323
+ $route.reload();
1324
+ Notifications.success("The identity provider has been deleted.");
1325
+ });
1326
+ });
1327
+ };
1328
+
1329
+ // KEYCLOAK-5932: remove social providers that have already been defined
1330
+ function removeUsedSocial() {
1331
+ var i = $scope.allProviders.length;
1332
+ while (i--) {
1333
+ if ($scope.allProviders[i].groupName !== 'Social') continue;
1334
+ if ($scope.configuredProviders != null) {
1335
+ for (var j = 0; j < $scope.configuredProviders.length; j++) {
1336
+ if ($scope.configuredProviders[j].providerId === $scope.allProviders[i].id) {
1337
+ $scope.allProviders.splice(i, 1);
1338
+ break;
1339
+ }
1340
+ }
1341
+ }
1342
+ }
1343
+ };
1344
+
1345
+ if (instance && instance.alias) {
1346
+ try { $scope.authnContextClassRefs = JSON.parse($scope.identityProvider.config.authnContextClassRefs || '[]'); } catch (e) { $scope.authnContextClassRefs = []; }
1347
+ try { $scope.authnContextDeclRefs = JSON.parse($scope.identityProvider.config.authnContextDeclRefs || '[]'); } catch (e) { $scope.authnContextDeclRefs = []; }
1348
+ } else {
1349
+ $scope.authnContextClassRefs = [];
1350
+ $scope.authnContextDeclRefs = [];
1351
+ }
1352
+
1353
+ $scope.deleteAuthnContextClassRef = function(index) {
1354
+ $scope.authnContextClassRefs.splice(index, 1);
1355
+ $scope.identityProvider.config.authnContextClassRefs = JSON.stringify($scope.authnContextClassRefs);
1356
+ };
1357
+
1358
+ $scope.addAuthnContextClassRef = function() {
1359
+ $scope.authnContextClassRefs.push($scope.newAuthnContextClassRef);
1360
+ $scope.identityProvider.config.authnContextClassRefs = JSON.stringify($scope.authnContextClassRefs);
1361
+ $scope.newAuthnContextClassRef = "";
1362
+ };
1363
+
1364
+ $scope.deleteAuthnContextDeclRef = function(index) {
1365
+ $scope.authnContextDeclRefs.splice(index, 1);
1366
+ $scope.identityProvider.config.authnContextDeclRefs = JSON.stringify($scope.authnContextDeclRefs);
1367
+ };
1368
+
1369
+ $scope.addAuthnContextDeclRef = function() {
1370
+ $scope.authnContextDeclRefs.push($scope.newAuthnContextDeclRef);
1371
+ $scope.identityProvider.config.authnContextDeclRefs = JSON.stringify($scope.authnContextDeclRefs);
1372
+ $scope.newAuthnContextDeclRef = "";
1373
+ };
1374
+ });
1375
+
1376
+ module.controller('RealmTokenDetailCtrl', function($scope, Realm, realm, $http, $location, $route, Dialog, Notifications, TimeUnit, TimeUnit2, serverInfo) {
1377
+ $scope.realm = realm;
1378
+ $scope.serverInfo = serverInfo;
1379
+ $scope.actionTokenProviders = $scope.serverInfo.providers.actionTokenHandler.providers;
1380
+
1381
+ $scope.realm.accessTokenLifespan = TimeUnit2.asUnit(realm.accessTokenLifespan);
1382
+ $scope.realm.accessTokenLifespanForImplicitFlow = TimeUnit2.asUnit(realm.accessTokenLifespanForImplicitFlow);
1383
+ $scope.realm.ssoSessionIdleTimeout = TimeUnit2.asUnit(realm.ssoSessionIdleTimeout);
1384
+ $scope.realm.ssoSessionMaxLifespan = TimeUnit2.asUnit(realm.ssoSessionMaxLifespan);
1385
+ $scope.realm.ssoSessionIdleTimeoutRememberMe = TimeUnit2.asUnit(realm.ssoSessionIdleTimeoutRememberMe);
1386
+ $scope.realm.ssoSessionMaxLifespanRememberMe = TimeUnit2.asUnit(realm.ssoSessionMaxLifespanRememberMe);
1387
+ $scope.realm.offlineSessionIdleTimeout = TimeUnit2.asUnit(realm.offlineSessionIdleTimeout);
1388
+ // KEYCLOAK-7688 Offline Session Max for Offline Token
1389
+ $scope.realm.offlineSessionMaxLifespan = TimeUnit2.asUnit(realm.offlineSessionMaxLifespan);
1390
+ $scope.realm.clientSessionIdleTimeout = TimeUnit2.asUnit(realm.clientSessionIdleTimeout);
1391
+ $scope.realm.clientSessionMaxLifespan = TimeUnit2.asUnit(realm.clientSessionMaxLifespan);
1392
+ $scope.realm.clientOfflineSessionIdleTimeout = TimeUnit2.asUnit(realm.clientOfflineSessionIdleTimeout);
1393
+ $scope.realm.clientOfflineSessionMaxLifespan = TimeUnit2.asUnit(realm.clientOfflineSessionMaxLifespan);
1394
+ $scope.realm.accessCodeLifespan = TimeUnit2.asUnit(realm.accessCodeLifespan);
1395
+ $scope.realm.accessCodeLifespanLogin = TimeUnit2.asUnit(realm.accessCodeLifespanLogin);
1396
+ $scope.realm.accessCodeLifespanUserAction = TimeUnit2.asUnit(realm.accessCodeLifespanUserAction);
1397
+ $scope.realm.actionTokenGeneratedByAdminLifespan = TimeUnit2.asUnit(realm.actionTokenGeneratedByAdminLifespan);
1398
+ $scope.realm.actionTokenGeneratedByUserLifespan = TimeUnit2.asUnit(realm.actionTokenGeneratedByUserLifespan);
1399
+ $scope.realm.oauth2DeviceCodeLifespan = TimeUnit2.asUnit(realm.oauth2DeviceCodeLifespan);
1400
+ $scope.realm.attributes.parRequestUriLifespan = TimeUnit2.asUnit(realm.attributes.parRequestUriLifespan);
1401
+ $scope.realm.attributes = realm.attributes;
1402
+
1403
+ var oldCopy = angular.copy($scope.realm);
1404
+ $scope.changed = false;
1405
+
1406
+ $scope.$watch('realm', function() {
1407
+ if (!angular.equals($scope.realm, oldCopy)) {
1408
+ $scope.changed = true;
1409
+ }
1410
+ }, true);
1411
+
1412
+ $scope.$watch('actionLifespanId', function () {
1413
+ // changedActionLifespanId signals other watchers that we were merely
1414
+ // changing the dropdown and we should not enable 'save' button
1415
+ if ($scope.actionTokenAttribute && $scope.actionTokenAttribute.hasOwnProperty('time')) {
1416
+ $scope.changedActionLifespanId = true;
1417
+ }
1418
+
1419
+ $scope.actionTokenAttribute = TimeUnit2.asUnit($scope.realm.attributes['actionTokenGeneratedByUserLifespan.' + $scope.actionLifespanId]);
1420
+ }, true);
1421
+
1422
+ $scope.$watch('actionTokenAttribute', function () {
1423
+ if ($scope.actionLifespanId === null) return;
1424
+
1425
+ if ($scope.changedActionLifespanId) {
1426
+ $scope.changedActionLifespanId = false;
1427
+ return;
1428
+ } else {
1429
+ $scope.changed = true;
1430
+ }
1431
+
1432
+ if ($scope.actionTokenAttribute !== null) {
1433
+ $scope.realm.attributes['actionTokenGeneratedByUserLifespan.' + $scope.actionLifespanId] = $scope.actionTokenAttribute.toSeconds();
1434
+ }
1435
+ }, true);
1436
+
1437
+ $scope.changeRevokeRefreshToken = function() {
1438
+
1439
+ };
1440
+
1441
+ $scope.save = function() {
1442
+ $scope.realm.accessTokenLifespan = $scope.realm.accessTokenLifespan.toSeconds();
1443
+ $scope.realm.accessTokenLifespanForImplicitFlow = $scope.realm.accessTokenLifespanForImplicitFlow.toSeconds();
1444
+ $scope.realm.ssoSessionIdleTimeout = $scope.realm.ssoSessionIdleTimeout.toSeconds();
1445
+ $scope.realm.ssoSessionMaxLifespan = $scope.realm.ssoSessionMaxLifespan.toSeconds();
1446
+ $scope.realm.ssoSessionIdleTimeoutRememberMe = $scope.realm.ssoSessionIdleTimeoutRememberMe.toSeconds();
1447
+ $scope.realm.ssoSessionMaxLifespanRememberMe = $scope.realm.ssoSessionMaxLifespanRememberMe.toSeconds();
1448
+ $scope.realm.offlineSessionIdleTimeout = $scope.realm.offlineSessionIdleTimeout.toSeconds();
1449
+ // KEYCLOAK-7688 Offline Session Max for Offline Token
1450
+ $scope.realm.offlineSessionMaxLifespan = $scope.realm.offlineSessionMaxLifespan.toSeconds();
1451
+ $scope.realm.clientSessionIdleTimeout = $scope.realm.clientSessionIdleTimeout.toSeconds();
1452
+ $scope.realm.clientSessionMaxLifespan = $scope.realm.clientSessionMaxLifespan.toSeconds();
1453
+ $scope.realm.clientOfflineSessionIdleTimeout = $scope.realm.clientOfflineSessionIdleTimeout.toSeconds();
1454
+ $scope.realm.clientOfflineSessionMaxLifespan = $scope.realm.clientOfflineSessionMaxLifespan.toSeconds();
1455
+ $scope.realm.accessCodeLifespan = $scope.realm.accessCodeLifespan.toSeconds();
1456
+ $scope.realm.accessCodeLifespanUserAction = $scope.realm.accessCodeLifespanUserAction.toSeconds();
1457
+ $scope.realm.accessCodeLifespanLogin = $scope.realm.accessCodeLifespanLogin.toSeconds();
1458
+ $scope.realm.actionTokenGeneratedByAdminLifespan = $scope.realm.actionTokenGeneratedByAdminLifespan.toSeconds();
1459
+ $scope.realm.actionTokenGeneratedByUserLifespan = $scope.realm.actionTokenGeneratedByUserLifespan.toSeconds();
1460
+ $scope.realm.oauth2DeviceCodeLifespan = $scope.realm.oauth2DeviceCodeLifespan.toSeconds();
1461
+ $scope.realm.attributes.parRequestUriLifespan = $scope.realm.attributes.parRequestUriLifespan.toSeconds();
1462
+
1463
+ Realm.update($scope.realm, function () {
1464
+ $route.reload();
1465
+ Notifications.success("The changes have been saved to the realm.");
1466
+ });
1467
+ };
1468
+
1469
+ $scope.resetToDefaultToken = function (actionTokenId) {
1470
+ $scope.actionTokenAttribute = {};
1471
+ delete $scope.realm.attributes['actionTokenGeneratedByUserLifespan.' + $scope.actionLifespanId];
1472
+ //Only for UI effects, resets to the original state
1473
+ $scope.actionTokenAttribute.unit = 'Minutes';
1474
+ }
1475
+
1476
+ $scope.reset = function() {
1477
+ $route.reload();
1478
+ };
1479
+ });
1480
+
1481
+ module.controller('RealmUserProfileCtrl', function($scope, Realm, realm, clientScopes, $http, $location, $route, UserProfile, Dialog, Notifications, serverInfo) {
1482
+ $scope.realm = realm;
1483
+ $scope.validatorProviders = serverInfo.componentTypes['org.keycloak.validate.Validator'];
1484
+
1485
+ $scope.isShowAttributes = true;
1486
+ $scope.isShowAttributeGroups = false;
1487
+ $scope.isShowJsonEditor = false;
1488
+
1489
+ UserProfile.get({realm: realm.realm}, function(config) {
1490
+ $scope.config = config;
1491
+ $scope.rawConfig = angular.toJson(config, true);
1492
+ });
1493
+
1494
+ $scope.isShowAttributes = true;
1495
+ $scope.isShowAttributeGroups = false;
1496
+ $scope.isShowJsonEditor = false;
1497
+
1498
+ $scope.showAttributes = function() {
1499
+ $route.reload();
1500
+ delete $scope.currentAttributeGroup;
1501
+ }
1502
+
1503
+ $scope.showAttributeGroups = function() {
1504
+ $scope.isShowAttributes = false;
1505
+ $scope.isShowAttributeGroups = true;
1506
+ $scope.isShowJsonEditor = false;
1507
+ delete $scope.currentAttribute;
1508
+ }
1509
+
1510
+ $scope.showJsonEditor = function() {
1511
+ $scope.isShowAttributes = false;
1512
+ $scope.isShowAttributeGroups = false;
1513
+ $scope.isShowJsonEditor = true;
1514
+ delete $scope.currentAttribute;
1515
+ delete $scope.currentAttributeGroup;
1516
+ }
1517
+
1518
+ $scope.isRequiredRoles = {
1519
+ minimumInputLength: 0,
1520
+ delay: 500,
1521
+ allowClear: true,
1522
+ id: function(e) { return e; },
1523
+ query: function (query) {
1524
+ var expectedRoles = ['user', 'admin'];
1525
+ var roles = [];
1526
+
1527
+ if ('' == query.term.trim()) {
1528
+ roles = expectedRoles;
1529
+ } else {
1530
+ for (var i = 0; i < expectedRoles.length; i++) {
1531
+ if (expectedRoles[i].indexOf(query.term.trim()) != -1) {
1532
+ roles.push(expectedRoles[i]);
1533
+ }
1534
+ }
1535
+ }
1536
+
1537
+ query.callback({results: roles});
1538
+ },
1539
+ formatResult: function(object, container, query) {
1540
+ return object;
1541
+ },
1542
+ formatSelection: function(object, container, query) {
1543
+ return object;
1544
+ }
1545
+ };
1546
+
1547
+ $scope.isRequiredScopes = {
1548
+ minimumInputLength: 1,
1549
+ delay: 500,
1550
+ allowClear: true,
1551
+ query: function (query) {
1552
+ var scopes = [];
1553
+
1554
+ if ('' == query.term.trim()) {
1555
+ scopes = clientScopes;
1556
+ } else {
1557
+ for (var i = 0; i < clientScopes.length; i++) {
1558
+ if (clientScopes[i].name.indexOf(query.term.trim()) != -1) {
1559
+ scopes.push(clientScopes[i]);
1560
+ }
1561
+ }
1562
+ }
1563
+
1564
+ query.callback({results: scopes});
1565
+ },
1566
+ formatResult: function(object, container, query) {
1567
+ return object.name;
1568
+ },
1569
+ formatSelection: function(object, container, query) {
1570
+ return object.name;
1571
+ }
1572
+ };
1573
+
1574
+ $scope.selectorByScopeSelect = {
1575
+ minimumInputLength: 1,
1576
+ delay: 500,
1577
+ allowClear: true,
1578
+ query: function (query) {
1579
+ var scopes = [];
1580
+
1581
+ if ('' == query.term.trim()) {
1582
+ scopes = clientScopes;
1583
+ } else {
1584
+ for (var i = 0; i < clientScopes.length; i++) {
1585
+ if (clientScopes[i].name.indexOf(query.term.trim()) != -1) {
1586
+ scopes.push(clientScopes[i]);
1587
+ }
1588
+ }
1589
+ }
1590
+
1591
+ query.callback({results: scopes});
1592
+ },
1593
+ formatResult: function(object, container, query) {
1594
+ return object.name;
1595
+ },
1596
+ formatSelection: function(object, container, query) {
1597
+ return object.name;
1598
+ }
1599
+ };
1600
+
1601
+ $scope.attributeSelected = false;
1602
+
1603
+ $scope.showAttributeListing = function() {
1604
+ return !$scope.attributeSelected && $scope.currentAttribute == null && $scope.isShowAttributes;
1605
+ }
1606
+
1607
+ $scope.showAttributeGroupListing = function() {
1608
+ return !$scope.attributeGroupSelected && $scope.currentAttributeGroup == null && $scope.isShowAttributeGroups;
1609
+ }
1610
+
1611
+ $scope.createAttribute = function() {
1612
+ $scope.isCreateAttribute = true;
1613
+ $scope.currentAttribute = {
1614
+ selector: {
1615
+ scopes: []
1616
+ },
1617
+ required: {
1618
+ roles: [],
1619
+ scopes: []
1620
+ },
1621
+ permissions: {
1622
+ view: [],
1623
+ edit: []
1624
+ }
1625
+ };
1626
+ };
1627
+
1628
+ $scope.createAttributeGroup = function() {
1629
+ $scope.isCreateAttributeGroup = true;
1630
+ $scope.currentAttributeGroup = {};
1631
+ };
1632
+
1633
+ $scope.isNotUsernameOrEmail = function(attributeName) {
1634
+ return attributeName != "username" && attributeName != "email";
1635
+ };
1636
+
1637
+ $scope.guiOrderUp = function(index) {
1638
+ $scope.moveAttribute(index, index - 1);
1639
+ };
1640
+
1641
+ $scope.guiOrderDown = function(index) {
1642
+ $scope.moveAttribute(index, index + 1);
1643
+ };
1644
+
1645
+ $scope.moveAttribute = function(old_index, new_index){
1646
+ $scope.config.attributes.splice(new_index, 0, $scope.config.attributes.splice(old_index, 1)[0]);
1647
+ $scope.save();
1648
+ }
1649
+
1650
+ $scope.groupOrderUp = function(index) {
1651
+ $scope.moveAttributeGroup(index, index - 1);
1652
+ };
1653
+
1654
+ $scope.groupOrderDown = function(index) {
1655
+ $scope.moveAttributeGroup(index, index + 1);
1656
+ };
1657
+
1658
+ $scope.moveAttributeGroup = function(old_index, new_index){
1659
+ $scope.config.groups.splice(new_index, 0, $scope.config.groups.splice(old_index, 1)[0]);
1660
+ $scope.save(false);
1661
+ }
1662
+
1663
+ $scope.removeAttribute = function(attribute) {
1664
+ Dialog.confirmDelete(attribute.name, 'attribute', function() {
1665
+ let newAttributes = [];
1666
+
1667
+ for (var v of $scope.config.attributes) {
1668
+ if (v != attribute) {
1669
+ newAttributes.push(v);
1670
+ }
1671
+ }
1672
+
1673
+ $scope.config.attributes = newAttributes;
1674
+ $scope.save();
1675
+ });
1676
+ };
1677
+
1678
+ $scope.removeAttributeGroup = function(attributeGroup) {
1679
+ Dialog.confirmDelete(attributeGroup.name, 'group', function() {
1680
+ let newGroups = [];
1681
+
1682
+ for (var v of $scope.config.groups) {
1683
+ if (v != attributeGroup) {
1684
+ newGroups.push(v);
1685
+ }
1686
+ }
1687
+
1688
+ $scope.config.groups = newGroups;
1689
+ $scope.save();
1690
+ });
1691
+ };
1692
+
1693
+ $scope.addAttributeAnnotation = function() {
1694
+ if (!$scope.currentAttribute.annotations) {
1695
+ $scope.currentAttribute.annotations = {};
1696
+ }
1697
+ $scope.currentAttribute.annotations[$scope.newAnnotation.key] = $scope.newAnnotation.value;
1698
+ delete $scope.newAnnotation;
1699
+ }
1700
+
1701
+ $scope.removeAttributeAnnotation = function(key) {
1702
+ delete $scope.currentAttribute.annotations[key];
1703
+ }
1704
+
1705
+ $scope.addAttributeGroupAnnotation = function() {
1706
+ if (!$scope.currentAttributeGroup.annotations) {
1707
+ $scope.currentAttributeGroup.annotations = {};
1708
+ }
1709
+ $scope.currentAttributeGroup.annotations[$scope.newAttributeGroupAnnotation.key] = $scope.newAttributeGroupAnnotation.value;
1710
+ delete $scope.newGroupAnnotation;
1711
+ }
1712
+
1713
+ $scope.removeAttributeGroupAnnotation = function(key) {
1714
+ delete $scope.currentAttributeGroup.annotations[key];
1715
+ }
1716
+
1717
+ $scope.editAttribute = function(attribute) {
1718
+ // it isn't be possible to set permissions to username and email
1719
+ if (attribute.permissions == null && (attribute.name != 'username' && attribute.name != 'email')) {
1720
+ attribute.permissions = {
1721
+ view: [],
1722
+ edit: []
1723
+ };
1724
+ }
1725
+
1726
+ if (attribute.selector == null) {
1727
+ attribute.selector = {
1728
+ scopes: []
1729
+ };
1730
+ }
1731
+
1732
+ if (attribute.required) {
1733
+ if (attribute.required.roles) {
1734
+ $scope.requiredRoles = attribute.required.roles;
1735
+ }
1736
+ if (attribute.required.scopes) {
1737
+ for (var i = 0; i < attribute.required.scopes.length; i++) {
1738
+ $scope.requiredScopes.push({
1739
+ id: attribute.required.scopes[i],
1740
+ name: attribute.required.scopes[i]
1741
+ });
1742
+ }
1743
+ }
1744
+ }
1745
+
1746
+ if (attribute.selector && attribute.selector.scopes) {
1747
+ for (var i = 0; i < attribute.selector.scopes.length; i++) {
1748
+ $scope.selectorByScope.push({
1749
+ id: attribute.selector.scopes[i],
1750
+ name: attribute.selector.scopes[i]
1751
+ });
1752
+ }
1753
+ }
1754
+
1755
+ $scope.isRequired = attribute.required != null;
1756
+
1757
+ if (attribute.permissions != null) {
1758
+ $scope.canUserView = attribute.permissions.view.includes('user');
1759
+ $scope.canAdminView = attribute.permissions.view.includes('admin');
1760
+ $scope.canUserEdit = attribute.permissions.edit.includes('user');
1761
+ $scope.canAdminEdit = attribute.permissions.edit.includes('admin');
1762
+ }
1763
+
1764
+ $scope.currentAttribute = attribute;
1765
+ $scope.attributeSelected = true;
1766
+ };
1767
+
1768
+ $scope.editAttributeGroup = function(attributeGroup) {
1769
+ $scope.currentAttributeGroup = attributeGroup;
1770
+ $scope.attributeGroupSelected = true;
1771
+ };
1772
+
1773
+ $scope.groupIsReferencedInAnyAttribute = function(group) {
1774
+ for (var currentAttribute of $scope.config.attributes) {
1775
+ if (currentAttribute.group === group.name) {
1776
+ return true
1777
+ }
1778
+ }
1779
+ return false;
1780
+ }
1781
+
1782
+ $scope.$watch('isRequired', function() {
1783
+ if ($scope.isRequired) {
1784
+ $scope.currentAttribute.required = {
1785
+ roles: [],
1786
+ scopes: []
1787
+ };
1788
+ } else if ($scope.currentAttribute) {
1789
+ delete $scope.currentAttribute.required;
1790
+ }
1791
+ }, true);
1792
+
1793
+ handlePermission = function(permission, role, allowed) {
1794
+ let attribute = $scope.currentAttribute;
1795
+
1796
+ if (attribute && attribute.permissions) {
1797
+ let roles = [];
1798
+
1799
+ for (let r of attribute.permissions[permission]) {
1800
+ if (r != role) {
1801
+ roles.push(r);
1802
+ }
1803
+ }
1804
+
1805
+ if (allowed) {
1806
+ roles.push(role);
1807
+ }
1808
+
1809
+ attribute.permissions[permission] = roles;
1810
+ }
1811
+ }
1812
+
1813
+ $scope.$watch('canUserView', function() {
1814
+ handlePermission('view', 'user', $scope.canUserView);
1815
+ }, true);
1816
+
1817
+ $scope.$watch('canAdminView', function() {
1818
+ handlePermission('view', 'admin', $scope.canAdminView);
1819
+ }, true);
1820
+
1821
+ $scope.$watch('canUserEdit', function() {
1822
+ handlePermission('edit', 'user', $scope.canUserEdit);
1823
+ }, true);
1824
+
1825
+ $scope.$watch('canAdminEdit', function() {
1826
+ handlePermission('edit', 'admin', $scope.canAdminEdit);
1827
+ }, true);
1828
+
1829
+ $scope.addValidator = function(validator) {
1830
+ if ($scope.currentAttribute.validations == null) {
1831
+ $scope.currentAttribute.validations = {};
1832
+ }
1833
+
1834
+ let config = {};
1835
+
1836
+ for (let key in validator.config) {
1837
+ let values = validator.config[key];
1838
+
1839
+ if (Array.isArray(values)) {
1840
+ config[key] = values;
1841
+ } else {
1842
+ for (let k in values) {
1843
+ config[key] = values[k];
1844
+ }
1845
+ }
1846
+ }
1847
+
1848
+ $scope.currentAttribute.validations[validator.id] = config;
1849
+
1850
+ delete $scope.newValidator;
1851
+ };
1852
+
1853
+ $scope.selectValidator = function(validator) {
1854
+ validator.config = {};
1855
+ };
1856
+
1857
+ $scope.cancelAddValidator = function() {
1858
+ delete $scope.newValidator;
1859
+ };
1860
+
1861
+ $scope.removeValidator = function(id) {
1862
+ let newValidators = {};
1863
+
1864
+ for (let v in $scope.currentAttribute.validations) {
1865
+ if (v != id) {
1866
+ newValidators[v] = $scope.currentAttribute.validations[v];
1867
+ }
1868
+ }
1869
+
1870
+ if (newValidators.length == 0) {
1871
+ delete $scope.currentAttribute.validations;
1872
+ return;
1873
+ }
1874
+
1875
+ $scope.currentAttribute.validations = newValidators;
1876
+ };
1877
+
1878
+ $scope.reloadConfigurationFromUserProfile = function () {
1879
+ UserProfile.get({realm: realm.realm}, function(config) {
1880
+ $scope.config = config;
1881
+ $scope.rawConfig = angular.toJson(config, true);
1882
+ });
1883
+ }
1884
+
1885
+ $scope.save = function() {
1886
+ $scope.save(true)
1887
+ }
1888
+
1889
+ $scope.save = function(reload) {
1890
+ if ($scope.isShowJsonEditor) {
1891
+ $scope.config = JSON.parse($scope.rawConfig);
1892
+ }
1893
+
1894
+ if ($scope.currentAttribute) {
1895
+ if ($scope.isRequired) {
1896
+ $scope.currentAttribute.required.roles = $scope.requiredRoles;
1897
+
1898
+ for (var i = 0; i < $scope.requiredScopes.length; i++) {
1899
+ $scope.currentAttribute.required.scopes.push($scope.requiredScopes[i].name);
1900
+ }
1901
+ }
1902
+
1903
+ $scope.currentAttribute.selector = {scopes: []};
1904
+
1905
+ for (var i = 0; i < $scope.selectorByScope.length; i++) {
1906
+ $scope.currentAttribute.selector.scopes.push($scope.selectorByScope[i].name);
1907
+ }
1908
+
1909
+ if ($scope.isCreateAttribute) {
1910
+ $scope.config['attributes'].push($scope.currentAttribute);
1911
+ }
1912
+ }
1913
+
1914
+ if ($scope.currentAttributeGroup) {
1915
+ if ($scope.config['groups'] == null) {
1916
+ $scope.config['groups'] = []
1917
+ }
1918
+ if ($scope.isCreateAttributeGroup) {
1919
+ $scope.config['groups'].push($scope.currentAttributeGroup);
1920
+ }
1921
+ }
1922
+
1923
+ UserProfile.update({realm: realm.realm},
1924
+
1925
+ $scope.config, function () {
1926
+ $scope.attributeSelected = false;
1927
+ delete $scope.currentAttribute;
1928
+ delete $scope.isCreateAttribute
1929
+ delete $scope.attributeSelected;
1930
+ delete $scope.currentAttributeGroup;
1931
+ delete $scope.isCreateAttributeGroup;
1932
+ delete $scope.attributeGroupSelected;
1933
+ delete $scope.isRequired;
1934
+ delete $scope.canUserView;
1935
+ delete $scope.canAdminView;
1936
+ delete $scope.canUserEdit;
1937
+ delete $scope.canAdminEdit;
1938
+
1939
+ if (reload) {
1940
+ $route.reload();
1941
+ } else {
1942
+ $scope.reloadConfigurationFromUserProfile();
1943
+ }
1944
+ Notifications.success("User Profile configuration has been saved.");
1945
+ });
1946
+ };
1947
+
1948
+ $scope.cancelEditAttributeGroup = function() {
1949
+ delete $scope.currentAttributeGroup;
1950
+ delete $scope.isCreateAttributeGroup;
1951
+ delete $scope.attributeGroupSelected;
1952
+ $scope.reloadConfigurationFromUserProfile();
1953
+ }
1954
+
1955
+ $scope.reset = function() {
1956
+ $route.reload();
1957
+ };
1958
+ });
1959
+
1960
+ module.controller('ViewKeyCtrl', function($scope, key) {
1961
+ $scope.key = key;
1962
+ });
1963
+
1964
+ module.controller('RealmKeysCtrl', function($scope, Realm, realm, $http, $route, $location, Dialog, Notifications, serverInfo, keys, Components, $modal) {
1965
+ $scope.realm = angular.copy(realm);
1966
+ $scope.keys = keys.keys;
1967
+ $scope.active = {};
1968
+
1969
+ Components.query({realm: realm.realm,
1970
+ parent: realm.id,
1971
+ type: 'org.keycloak.keys.KeyProvider'
1972
+ }, function(data) {
1973
+ for (var i = 0; i < keys.keys.length; i++) {
1974
+ for (var j = 0; j < data.length; j++) {
1975
+ if (keys.keys[i].providerId == data[j].id) {
1976
+ keys.keys[i].provider = data[j];
1977
+ }
1978
+ }
1979
+ }
1980
+
1981
+ for (var t in keys.active) {
1982
+ for (var i = 0; i < keys.keys.length; i++) {
1983
+ if (keys.active[t] == keys.keys[i].kid) {
1984
+ $scope.active[t] = keys.keys[i];
1985
+ }
1986
+ }
1987
+ }
1988
+ });
1989
+
1990
+ $scope.viewKey = function(key) {
1991
+ $modal.open({
1992
+ templateUrl: resourceUrl + '/partials/modal/view-key.html',
1993
+ controller: 'ViewKeyCtrl',
1994
+ resolve: {
1995
+ key: function () {
1996
+ return key;
1997
+ }
1998
+ }
1999
+ })
2000
+ }
2001
+ });
2002
+
2003
+ module.controller('RealmKeysProvidersCtrl', function($scope, Realm, realm, $http, $route, $location, Dialog, Notifications, serverInfo, Components, $modal) {
2004
+ $scope.realm = angular.copy(realm);
2005
+ $scope.enableUpload = false;
2006
+
2007
+ $scope.providers = serverInfo.componentTypes['org.keycloak.keys.KeyProvider'];
2008
+
2009
+ Components.query({realm: realm.realm,
2010
+ parent: realm.id,
2011
+ type: 'org.keycloak.keys.KeyProvider'
2012
+ }, function(data) {
2013
+ $scope.instances = data;
2014
+
2015
+ for (var i = 0; i < $scope.instances.length; i++) {
2016
+ for (var j = 0; j < $scope.providers.length; j++) {
2017
+ if ($scope.providers[j].id === $scope.instances[i].providerId) {
2018
+ $scope.instances[i].provider = $scope.providers[j];
2019
+ }
2020
+ }
2021
+ }
2022
+ });
2023
+
2024
+ $scope.addProvider = function(provider) {
2025
+ $location.url("/create/keys/" + realm.realm + "/providers/" + provider.id);
2026
+ };
2027
+
2028
+ $scope.removeInstance = function(instance) {
2029
+ Dialog.confirmDelete(instance.name, 'key provider', function() {
2030
+ Components.remove({
2031
+ realm : realm.realm,
2032
+ componentId : instance.id
2033
+ }, function() {
2034
+ $route.reload();
2035
+ Notifications.success("The provider has been deleted.");
2036
+ });
2037
+ });
2038
+ };
2039
+ });
2040
+
2041
+ module.controller('GenericKeystoreCtrl', function($scope, $location, Notifications, $route, Dialog, realm, serverInfo, instance, providerId, Components) {
2042
+ $scope.create = !instance.providerId;
2043
+ $scope.realm = realm;
2044
+
2045
+ var providers = serverInfo.componentTypes['org.keycloak.keys.KeyProvider'];
2046
+ var providerFactory = null;
2047
+ for (var i = 0; i < providers.length; i++) {
2048
+ var p = providers[i];
2049
+ if (p.id == providerId) {
2050
+ $scope.providerFactory = p;
2051
+ providerFactory = p;
2052
+ break;
2053
+ }
2054
+ }
2055
+
2056
+ if ($scope.create) {
2057
+ $scope.instance = {
2058
+ name: providerFactory.id,
2059
+ providerId: providerFactory.id,
2060
+ providerType: 'org.keycloak.keys.KeyProvider',
2061
+ parentId: realm.id,
2062
+ config: {
2063
+ 'priority': ["0"]
2064
+ }
2065
+ }
2066
+ } else {
2067
+ $scope.instance = angular.copy(instance);
2068
+ }
2069
+
2070
+ if (providerFactory.properties) {
2071
+ for (var i = 0; i < providerFactory.properties.length; i++) {
2072
+ var configProperty = providerFactory.properties[i];
2073
+ if (!$scope.instance.config[configProperty.name]) {
2074
+ if (configProperty.defaultValue) {
2075
+ $scope.instance.config[configProperty.name] = [configProperty.defaultValue];
2076
+ if (!$scope.create) {
2077
+ instance.config[configProperty.name] = [configProperty.defaultValue];
2078
+ }
2079
+ } else {
2080
+ $scope.instance.config[configProperty.name] = [''];
2081
+ if (!$scope.create) {
2082
+ instance.config[configProperty.name] = [configProperty.defaultValue];
2083
+ }
2084
+ }
2085
+ }
2086
+ }
2087
+ }
2088
+
2089
+ $scope.$watch('instance', function() {
2090
+ if (!angular.equals($scope.instance, instance)) {
2091
+ $scope.changed = true;
2092
+ }
2093
+
2094
+ }, true);
2095
+
2096
+ $scope.save = function() {
2097
+ $scope.changed = false;
2098
+ if ($scope.create) {
2099
+ Components.save({realm: realm.realm}, $scope.instance, function (data, headers) {
2100
+ var l = headers().location;
2101
+ var id = l.substring(l.lastIndexOf("/") + 1);
2102
+
2103
+ $location.url("/realms/" + realm.realm + "/keys/providers/" + $scope.instance.providerId + "/" + id);
2104
+ Notifications.success("The provider has been created.");
2105
+ });
2106
+ } else {
2107
+ Components.update({realm: realm.realm,
2108
+ componentId: instance.id
2109
+ },
2110
+ $scope.instance, function () {
2111
+ $route.reload();
2112
+ Notifications.success("The provider has been updated.");
2113
+ });
2114
+ }
2115
+ };
2116
+
2117
+ $scope.reset = function() {
2118
+ $route.reload();
2119
+ };
2120
+
2121
+ $scope.cancel = function() {
2122
+ if ($scope.create) {
2123
+ $location.url("/realms/" + realm.realm + "/keys");
2124
+ } else {
2125
+ $route.reload();
2126
+ }
2127
+ };
2128
+ });
2129
+
2130
+ module.controller('RealmSessionStatsCtrl', function($scope, realm, stats, RealmClientSessionStats, RealmLogoutAll, Notifications) {
2131
+ $scope.realm = realm;
2132
+ $scope.stats = stats;
2133
+
2134
+ $scope.logoutAll = function() {
2135
+ RealmLogoutAll.save({realm : realm.realm}, function (globalReqResult) {
2136
+ var successCount = globalReqResult.successRequests ? globalReqResult.successRequests.length : 0;
2137
+ var failedCount = globalReqResult.failedRequests ? globalReqResult.failedRequests.length : 0;
2138
+
2139
+ if (failedCount > 0) {
2140
+ var msgStart = successCount>0 ? 'Successfully logout all users under: ' + globalReqResult.successRequests + ' . ' : '';
2141
+ Notifications.error(msgStart + 'Failed to logout users under: ' + globalReqResult.failedRequests + '. Verify availability of failed hosts and try again');
2142
+ } else {
2143
+ window.location.reload();
2144
+ }
2145
+ });
2146
+ };
2147
+ });
2148
+
2149
+
2150
+ module.controller('RealmRevocationCtrl', function($scope, Realm, RealmPushRevocation, realm, $http, $location, Dialog, Notifications) {
2151
+ $scope.realm = angular.copy(realm);
2152
+
2153
+ var setNotBefore = function() {
2154
+ if ($scope.realm.notBefore == 0) {
2155
+ $scope.notBefore = "None";
2156
+ } else {
2157
+ $scope.notBefore = new Date($scope.realm.notBefore * 1000);
2158
+ }
2159
+ };
2160
+
2161
+ setNotBefore();
2162
+
2163
+ var reset = function() {
2164
+ Realm.get({ id : realm.realm }, function(updated) {
2165
+ $scope.realm = updated;
2166
+ setNotBefore();
2167
+ })
2168
+
2169
+ };
2170
+
2171
+ $scope.clear = function() {
2172
+ Realm.update({ realm: realm.realm, notBefore : 0 }, function () {
2173
+ $scope.notBefore = "None";
2174
+ Notifications.success('Not Before cleared for realm.');
2175
+ reset();
2176
+ });
2177
+ }
2178
+ $scope.setNotBeforeNow = function() {
2179
+ Realm.update({ realm: realm.realm, notBefore : new Date().getTime()/1000}, function () {
2180
+ Notifications.success('Not Before set for realm.');
2181
+ reset();
2182
+ });
2183
+ }
2184
+ $scope.pushRevocation = function() {
2185
+ RealmPushRevocation.save({ realm: realm.realm}, function (globalReqResult) {
2186
+ var successCount = globalReqResult.successRequests ? globalReqResult.successRequests.length : 0;
2187
+ var failedCount = globalReqResult.failedRequests ? globalReqResult.failedRequests.length : 0;
2188
+
2189
+ if (successCount==0 && failedCount==0) {
2190
+ Notifications.warn('No push sent. No admin URI configured or no registered cluster nodes available');
2191
+ } else if (failedCount > 0) {
2192
+ var msgStart = successCount>0 ? 'Successfully push notBefore to: ' + globalReqResult.successRequests + ' . ' : '';
2193
+ Notifications.error(msgStart + 'Failed to push notBefore to: ' + globalReqResult.failedRequests + '. Verify availability of failed hosts and try again');
2194
+ } else {
2195
+ Notifications.success('Successfully push notBefore to all configured clients');
2196
+ }
2197
+ });
2198
+ }
2199
+
2200
+ });
2201
+
2202
+
2203
+ module.controller('RoleTabCtrl', function(Dialog, $scope, Current, Notifications, $location) {
2204
+ $scope.removeRole = function() {
2205
+ Dialog.confirmDelete($scope.role.name, 'role', function() {
2206
+ RoleById.remove({
2207
+ realm: realm.realm,
2208
+ role: $scope.role.id
2209
+ }, function () {
2210
+ $route.reload();
2211
+ Notifications.success("The role has been deleted.");
2212
+ });
2213
+ });
2214
+ };
2215
+ });
2216
+
2217
+
2218
+ module.controller('RoleListCtrl', function($scope, $route, Dialog, Notifications, realm, RoleList, RoleById, filterFilter) {
2219
+ $scope.realm = realm;
2220
+ $scope.roles = [];
2221
+ $scope.defaultRoleName = realm.defaultRole.name;
2222
+
2223
+ $scope.query = {
2224
+ realm: realm.realm,
2225
+ search : null,
2226
+ max : 20,
2227
+ first : 0
2228
+ }
2229
+
2230
+ $scope.$watch('query.search', function (newVal, oldVal) {
2231
+ if($scope.query.search && $scope.query.search.length >= 3) {
2232
+ $scope.firstPage();
2233
+ }
2234
+ }, true);
2235
+
2236
+ $scope.firstPage = function() {
2237
+ $scope.query.first = 0;
2238
+ $scope.searchQuery();
2239
+ }
2240
+
2241
+ $scope.previousPage = function() {
2242
+ $scope.query.first -= parseInt($scope.query.max);
2243
+ if ($scope.query.first < 0) {
2244
+ $scope.query.first = 0;
2245
+ }
2246
+ $scope.searchQuery();
2247
+ }
2248
+
2249
+ $scope.nextPage = function() {
2250
+ $scope.query.first += parseInt($scope.query.max);
2251
+ $scope.searchQuery();
2252
+ }
2253
+
2254
+ $scope.searchQuery = function() {
2255
+ $scope.searchLoaded = false;
2256
+
2257
+ $scope.roles = RoleList.query($scope.query, function() {
2258
+ $scope.searchLoaded = true;
2259
+ $scope.lastSearch = $scope.query.search;
2260
+ });
2261
+ };
2262
+
2263
+ $scope.searchQuery();
2264
+
2265
+ $scope.determineEditLink = function(role) {
2266
+ return role.name === $scope.defaultRoleName ? "/realms/" + $scope.realm.realm + "/default-roles" : "/realms/" + $scope.realm.realm + "/roles/" + role.id;
2267
+ }
2268
+
2269
+ $scope.removeRole = function (role) {
2270
+ if (role.name === $scope.defaultRoleName) return;
2271
+
2272
+ Dialog.confirmDelete(role.name, 'role', function () {
2273
+ RoleById.remove({
2274
+ realm: realm.realm,
2275
+ role: role.id
2276
+ }, function () {
2277
+ $route.reload();
2278
+ Notifications.success("The role has been deleted.");
2279
+ });
2280
+ });
2281
+ };
2282
+ });
2283
+
2284
+
2285
+ module.controller('RoleDetailCtrl', function($scope, realm, role, roles, Client, $route,
2286
+ Role, ClientRole, RoleById, RoleRealmComposites, RoleClientComposites,
2287
+ $http, $location, Dialog, Notifications, RealmRoleRemover, ComponentUtils) {
2288
+ $scope.realm = realm;
2289
+ $scope.role = angular.copy(role);
2290
+ $scope.create = !role.name;
2291
+
2292
+ $scope.changed = $scope.create;
2293
+
2294
+ $scope.save = function() {
2295
+ convertAttributeValuesToLists();
2296
+ console.log('save');
2297
+ if ($scope.create) {
2298
+ Role.save({
2299
+ realm: realm.realm
2300
+ }, $scope.role, function (data, headers) {
2301
+ $scope.changed = false;
2302
+ convertAttributeValuesToString($scope.role);
2303
+ role = angular.copy($scope.role);
2304
+
2305
+ Role.get({ realm: realm.realm, role: role.name }, function(role) {
2306
+ var id = role.id;
2307
+ $location.url("/realms/" + realm.realm + "/roles/" + id);
2308
+ Notifications.success("The role has been created.");
2309
+ });
2310
+ });
2311
+ } else {
2312
+ $scope.update();
2313
+ }
2314
+ };
2315
+
2316
+ $scope.remove = function() {
2317
+ RealmRoleRemover.remove($scope.role, realm, Dialog, $location, Notifications);
2318
+ };
2319
+
2320
+ $scope.cancel = function () {
2321
+ $location.url("/realms/" + realm.realm + "/roles");
2322
+ };
2323
+
2324
+ $scope.addAttribute = function() {
2325
+ $scope.role.attributes[$scope.newAttribute.key] = $scope.newAttribute.value;
2326
+ delete $scope.newAttribute;
2327
+ }
2328
+
2329
+ $scope.removeAttribute = function(key) {
2330
+ delete $scope.role.attributes[key];
2331
+ }
2332
+
2333
+ function convertAttributeValuesToLists() {
2334
+ var attrs = $scope.role.attributes;
2335
+ for (var attribute in attrs) {
2336
+ if (typeof attrs[attribute] === "string") {
2337
+ var attrVals = attrs[attribute].split("##");
2338
+ attrs[attribute] = attrVals;
2339
+ }
2340
+ }
2341
+ }
2342
+
2343
+ function convertAttributeValuesToString(role) {
2344
+ var attrs = role.attributes;
2345
+ for (var attribute in attrs) {
2346
+ if (typeof attrs[attribute] === "object") {
2347
+ var attrVals = attrs[attribute].join("##");
2348
+ attrs[attribute] = attrVals;
2349
+ console.log("attribute" + attrVals)
2350
+ }
2351
+ }
2352
+ }
2353
+
2354
+ roleControl($scope, $route, realm, role, roles, Client,
2355
+ ClientRole, RoleById, RoleRealmComposites, RoleClientComposites,
2356
+ $http, $location, Notifications, Dialog, ComponentUtils);
2357
+ });
2358
+
2359
+ module.controller('RealmSMTPSettingsCtrl', function($scope, Current, Realm, realm, $http, $location, Dialog, Notifications, RealmSMTPConnectionTester) {
2360
+ console.log('RealmSMTPSettingsCtrl');
2361
+
2362
+ var booleanSmtpAtts = ["auth","ssl","starttls"];
2363
+
2364
+ $scope.realm = realm;
2365
+
2366
+ if ($scope.realm.smtpServer) {
2367
+ $scope.realm.smtpServer = typeObject($scope.realm.smtpServer);
2368
+ };
2369
+
2370
+ var oldCopy = angular.copy($scope.realm);
2371
+ $scope.changed = false;
2372
+
2373
+ $scope.$watch('realm', function() {
2374
+ if (!angular.equals($scope.realm, oldCopy)) {
2375
+ $scope.changed = true;
2376
+ }
2377
+ }, true);
2378
+
2379
+ $scope.save = function() {
2380
+ var realmCopy = angular.copy($scope.realm);
2381
+ realmCopy['smtpServer'] = detypeObject(realmCopy.smtpServer);
2382
+ $scope.changed = false;
2383
+ Realm.update(realmCopy, function () {
2384
+ $location.url("/realms/" + realm.realm + "/smtp-settings");
2385
+ Notifications.success("Your changes have been saved to the realm.");
2386
+ });
2387
+ };
2388
+
2389
+ $scope.reset = function() {
2390
+ $scope.realm = angular.copy(oldCopy);
2391
+ $scope.changed = false;
2392
+ };
2393
+
2394
+ $scope.testConnection = function() {
2395
+ RealmSMTPConnectionTester.save({realm: realm.realm}, realm.smtpServer, function() {
2396
+ Notifications.success("SMTP connection successful. E-mail was sent!");
2397
+ }, function(errorResponse) {
2398
+ if (error.data.errorMessage) {
2399
+ Notifications.error(error.data.errorMessage);
2400
+ } else {
2401
+ Notifications.error('Unexpected error during SMTP validation');
2402
+ }
2403
+ });
2404
+ };
2405
+
2406
+ /* Convert string attributes containing a boolean to actual boolean type + convert an integer string (port) to integer. */
2407
+ function typeObject(obj){
2408
+ for (var att in obj){
2409
+ if (booleanSmtpAtts.indexOf(att) < 0)
2410
+ continue;
2411
+ if (obj[att] === "true"){
2412
+ obj[att] = true;
2413
+ } else if (obj[att] === "false"){
2414
+ obj[att] = false;
2415
+ }
2416
+ }
2417
+
2418
+ obj['port'] = parseInt(obj['port']);
2419
+
2420
+ return obj;
2421
+ }
2422
+
2423
+ /* Convert all non-string values to strings to invert changes caused by the typeObject function. */
2424
+ function detypeObject(obj){
2425
+ for (var att in obj){
2426
+ if (booleanSmtpAtts.indexOf(att) < 0)
2427
+ continue;
2428
+ if (obj[att] === true){
2429
+ obj[att] = "true";
2430
+ } else if (obj[att] === false){
2431
+ obj[att] = "false"
2432
+ }
2433
+ }
2434
+
2435
+ obj['port'] = obj['port'] && obj['port'].toString();
2436
+
2437
+ return obj;
2438
+ }
2439
+ });
2440
+
2441
+ module.controller('RealmEventsConfigCtrl', function($scope, eventsConfig, RealmEventsConfig, RealmEvents, RealmAdminEvents, realm, serverInfo, $location, Notifications, TimeUnit, Dialog) {
2442
+ $scope.realm = realm;
2443
+
2444
+ $scope.eventsConfig = eventsConfig;
2445
+
2446
+ $scope.eventsConfig.expirationUnit = TimeUnit.autoUnit(eventsConfig.eventsExpiration);
2447
+ $scope.eventsConfig.eventsExpiration = TimeUnit.toUnit(eventsConfig.eventsExpiration, $scope.eventsConfig.expirationUnit);
2448
+
2449
+ $scope.eventListeners = Object.keys(serverInfo.providers.eventsListener.providers);
2450
+
2451
+ $scope.eventsConfigSelectOptions = {
2452
+ 'multiple': true,
2453
+ 'simple_tags': true,
2454
+ 'tags': $scope.eventListeners
2455
+ };
2456
+
2457
+ $scope.eventSelectOptions = {
2458
+ 'multiple': true,
2459
+ 'simple_tags': true,
2460
+ 'tags': serverInfo.enums['eventType']
2461
+ };
2462
+
2463
+ var oldCopy = angular.copy($scope.eventsConfig);
2464
+ $scope.changed = false;
2465
+
2466
+ $scope.$watch('eventsConfig', function() {
2467
+ if (!angular.equals($scope.eventsConfig, oldCopy)) {
2468
+ $scope.changed = true;
2469
+ }
2470
+ }, true);
2471
+
2472
+ $scope.save = function() {
2473
+ $scope.changed = false;
2474
+
2475
+ var copy = angular.copy($scope.eventsConfig)
2476
+ delete copy['expirationUnit'];
2477
+
2478
+ copy.eventsExpiration = TimeUnit.toSeconds($scope.eventsConfig.eventsExpiration, $scope.eventsConfig.expirationUnit);
2479
+
2480
+ RealmEventsConfig.update({
2481
+ id : realm.realm
2482
+ }, copy, function () {
2483
+ $location.url("/realms/" + realm.realm + "/events-settings");
2484
+ Notifications.success("Your changes have been saved to the realm.");
2485
+ });
2486
+ };
2487
+
2488
+ $scope.reset = function() {
2489
+ $scope.eventsConfig = angular.copy(oldCopy);
2490
+ $scope.changed = false;
2491
+ };
2492
+
2493
+ $scope.clearEvents = function() {
2494
+ Dialog.confirmDelete($scope.realm.realm, 'events', function() {
2495
+ RealmEvents.remove({ id : $scope.realm.realm }, function() {
2496
+ Notifications.success("The events has been cleared.");
2497
+ });
2498
+ });
2499
+ };
2500
+
2501
+ $scope.clearAdminEvents = function() {
2502
+ Dialog.confirmDelete($scope.realm.realm, 'admin-events', function() {
2503
+ RealmAdminEvents.remove({ id : $scope.realm.realm }, function() {
2504
+ Notifications.success("The admin events has been cleared.");
2505
+ });
2506
+ });
2507
+ };
2508
+ });
2509
+
2510
+ module.controller('RealmEventsCtrl', function($scope, RealmEvents, realm, serverInfo) {
2511
+ $scope.realm = realm;
2512
+ $scope.page = 0;
2513
+
2514
+ $scope.eventSelectOptions = {
2515
+ 'multiple': true,
2516
+ 'simple_tags': true,
2517
+ 'tags': serverInfo.enums['eventType']
2518
+ };
2519
+
2520
+ $scope.query = {
2521
+ id : realm.realm,
2522
+ max : 5,
2523
+ first : 0
2524
+ }
2525
+
2526
+ $scope.disablePaste = function(e) {
2527
+ e.preventDefault();
2528
+ return false;
2529
+ }
2530
+
2531
+ $scope.update = function() {
2532
+ $scope.query.first = 0;
2533
+ for (var i in $scope.query) {
2534
+ if ($scope.query[i] === '') {
2535
+ delete $scope.query[i];
2536
+ }
2537
+ }
2538
+ $scope.events = RealmEvents.query($scope.query);
2539
+ }
2540
+
2541
+ $scope.reset = function() {
2542
+ $scope.query.first = 0;
2543
+ $scope.query.max = 5;
2544
+ $scope.query.type = '';
2545
+ $scope.query.client = '';
2546
+ $scope.query.user = '';
2547
+ $scope.query.dateFrom = '';
2548
+ $scope.query.dateTo = '';
2549
+
2550
+ $scope.update();
2551
+ }
2552
+
2553
+ $scope.queryUpdate = function() {
2554
+ for (var i in $scope.query) {
2555
+ if ($scope.query[i] === '') {
2556
+ delete $scope.query[i];
2557
+ }
2558
+ }
2559
+ $scope.events = RealmEvents.query($scope.query);
2560
+ }
2561
+
2562
+ $scope.firstPage = function() {
2563
+ $scope.query.first = 0;
2564
+ $scope.queryUpdate();
2565
+ }
2566
+
2567
+ $scope.previousPage = function() {
2568
+ $scope.query.first -= parseInt($scope.query.max);
2569
+ if ($scope.query.first < 0) {
2570
+ $scope.query.first = 0;
2571
+ }
2572
+ $scope.queryUpdate();
2573
+ }
2574
+
2575
+ $scope.nextPage = function() {
2576
+ $scope.query.first += parseInt($scope.query.max);
2577
+ $scope.queryUpdate();
2578
+ }
2579
+
2580
+ $scope.update();
2581
+ });
2582
+
2583
+ module.controller('RealmAdminEventsCtrl', function($scope, RealmAdminEvents, realm, serverInfo, $modal, $filter) {
2584
+ $scope.realm = realm;
2585
+ $scope.page = 0;
2586
+
2587
+ $scope.query = {
2588
+ id : realm.realm,
2589
+ max : 5,
2590
+ first : 0
2591
+ };
2592
+
2593
+ $scope.adminEnabledEventOperationsOptions = {
2594
+ 'multiple': true,
2595
+ 'simple_tags': true,
2596
+ 'tags': serverInfo.enums['operationType']
2597
+ };
2598
+
2599
+ $scope.adminEnabledEventResourceTypesOptions = {
2600
+ 'multiple': true,
2601
+ 'simple_tags': true,
2602
+ 'tags': serverInfo.enums['resourceType']
2603
+ };
2604
+
2605
+ $scope.disablePaste = function(e) {
2606
+ e.preventDefault();
2607
+ return false;
2608
+ }
2609
+
2610
+ $scope.update = function() {
2611
+ $scope.query.first = 0;
2612
+ for (var i in $scope.query) {
2613
+ if ($scope.query[i] === '') {
2614
+ delete $scope.query[i];
2615
+ }
2616
+ }
2617
+ $scope.events = RealmAdminEvents.query($scope.query);
2618
+ };
2619
+
2620
+ $scope.reset = function() {
2621
+ $scope.query.first = 0;
2622
+ $scope.query.max = 5;
2623
+ $scope.query.operationTypes = '';
2624
+ $scope.query.resourceTypes = '';
2625
+ $scope.query.resourcePath = '';
2626
+ $scope.query.authRealm = '';
2627
+ $scope.query.authClient = '';
2628
+ $scope.query.authUser = '';
2629
+ $scope.query.authIpAddress = '';
2630
+ $scope.query.dateFrom = '';
2631
+ $scope.query.dateTo = '';
2632
+
2633
+ $scope.update();
2634
+ };
2635
+
2636
+ $scope.queryUpdate = function() {
2637
+ for (var i in $scope.query) {
2638
+ if ($scope.query[i] === '') {
2639
+ delete $scope.query[i];
2640
+ }
2641
+ }
2642
+ $scope.events = RealmAdminEvents.query($scope.query);
2643
+ }
2644
+
2645
+ $scope.firstPage = function() {
2646
+ $scope.query.first = 0;
2647
+ $scope.queryUpdate();
2648
+ }
2649
+
2650
+ $scope.previousPage = function() {
2651
+ $scope.query.first -= parseInt($scope.query.max);
2652
+ if ($scope.query.first < 0) {
2653
+ $scope.query.first = 0;
2654
+ }
2655
+ $scope.queryUpdate();
2656
+ }
2657
+
2658
+ $scope.nextPage = function() {
2659
+ $scope.query.first += parseInt($scope.query.max);
2660
+ $scope.queryUpdate();
2661
+ }
2662
+
2663
+ $scope.update();
2664
+
2665
+ $scope.viewRepresentation = function(event) {
2666
+ $modal.open({
2667
+ templateUrl: resourceUrl + '/partials/modal/realm-events-admin-representation.html',
2668
+ controller: 'RealmAdminEventsModalCtrl',
2669
+ resolve: {
2670
+ event: function () {
2671
+ return event;
2672
+ }
2673
+ }
2674
+ })
2675
+ }
2676
+
2677
+ $scope.viewAuth = function(event) {
2678
+ $modal.open({
2679
+ templateUrl: resourceUrl + '/partials/modal/realm-events-admin-auth.html',
2680
+ controller: 'RealmAdminEventsModalCtrl',
2681
+ resolve: {
2682
+ event: function () {
2683
+ return event;
2684
+ }
2685
+ }
2686
+ })
2687
+ }
2688
+ });
2689
+
2690
+ module.controller('RealmAdminEventsModalCtrl', function($scope, $filter, event) {
2691
+ $scope.event = event;
2692
+ });
2693
+
2694
+ module.controller('RealmBruteForceCtrl', function($scope, Realm, realm, $http, $location, Dialog, Notifications, TimeUnit, $route) {
2695
+ console.log('RealmBruteForceCtrl');
2696
+
2697
+ $scope.realm = realm;
2698
+
2699
+ $scope.realm.waitIncrementUnit = TimeUnit.autoUnit(realm.waitIncrementSeconds);
2700
+ $scope.realm.waitIncrement = TimeUnit.toUnit(realm.waitIncrementSeconds, $scope.realm.waitIncrementUnit);
2701
+
2702
+ $scope.realm.minimumQuickLoginWaitUnit = TimeUnit.autoUnit(realm.minimumQuickLoginWaitSeconds);
2703
+ $scope.realm.minimumQuickLoginWait = TimeUnit.toUnit(realm.minimumQuickLoginWaitSeconds, $scope.realm.minimumQuickLoginWaitUnit);
2704
+
2705
+ $scope.realm.maxFailureWaitUnit = TimeUnit.autoUnit(realm.maxFailureWaitSeconds);
2706
+ $scope.realm.maxFailureWait = TimeUnit.toUnit(realm.maxFailureWaitSeconds, $scope.realm.maxFailureWaitUnit);
2707
+
2708
+ $scope.realm.maxDeltaTimeUnit = TimeUnit.autoUnit(realm.maxDeltaTimeSeconds);
2709
+ $scope.realm.maxDeltaTime = TimeUnit.toUnit(realm.maxDeltaTimeSeconds, $scope.realm.maxDeltaTimeUnit);
2710
+
2711
+ var oldCopy = angular.copy($scope.realm);
2712
+ $scope.changed = false;
2713
+
2714
+ $scope.$watch('realm', function() {
2715
+ if (!angular.equals($scope.realm, oldCopy)) {
2716
+ $scope.changed = true;
2717
+ }
2718
+ }, true);
2719
+
2720
+ $scope.save = function() {
2721
+ var realmCopy = angular.copy($scope.realm);
2722
+ delete realmCopy["waitIncrementUnit"];
2723
+ delete realmCopy["waitIncrement"];
2724
+ delete realmCopy["minimumQuickLoginWaitUnit"];
2725
+ delete realmCopy["minimumQuickLoginWait"];
2726
+ delete realmCopy["maxFailureWaitUnit"];
2727
+ delete realmCopy["maxFailureWait"];
2728
+ delete realmCopy["maxDeltaTimeUnit"];
2729
+ delete realmCopy["maxDeltaTime"];
2730
+
2731
+ realmCopy.waitIncrementSeconds = TimeUnit.toSeconds($scope.realm.waitIncrement, $scope.realm.waitIncrementUnit)
2732
+ realmCopy.minimumQuickLoginWaitSeconds = TimeUnit.toSeconds($scope.realm.minimumQuickLoginWait, $scope.realm.minimumQuickLoginWaitUnit)
2733
+ realmCopy.maxFailureWaitSeconds = TimeUnit.toSeconds($scope.realm.maxFailureWait, $scope.realm.maxFailureWaitUnit)
2734
+ realmCopy.maxDeltaTimeSeconds = TimeUnit.toSeconds($scope.realm.maxDeltaTime, $scope.realm.maxDeltaTimeUnit)
2735
+
2736
+ $scope.changed = false;
2737
+ Realm.update(realmCopy, function () {
2738
+ oldCopy = angular.copy($scope.realm);
2739
+ $location.url("/realms/" + realm.realm + "/defense/brute-force");
2740
+ Notifications.success("Your changes have been saved to the realm.");
2741
+ });
2742
+ };
2743
+
2744
+ $scope.reset = function() {
2745
+ $route.reload();
2746
+ };
2747
+ });
2748
+
2749
+
2750
+ module.controller('IdentityProviderMapperListCtrl', function($scope, realm, identityProvider, mapperTypes, mappers) {
2751
+ $scope.realm = realm;
2752
+ $scope.identityProvider = identityProvider;
2753
+ $scope.mapperTypes = mapperTypes;
2754
+ $scope.mappers = mappers;
2755
+ });
2756
+
2757
+ module.controller('IdentityProviderMapperCtrl', function ($scope, realm, identityProvider, mapperTypes, mapper, IdentityProviderMapper, Notifications, Dialog, ComponentUtils, $location) {
2758
+ $scope.realm = realm;
2759
+ $scope.identityProvider = identityProvider;
2760
+ $scope.create = false;
2761
+ $scope.changed = false;
2762
+ $scope.mapperType = mapperTypes[mapper.identityProviderMapper];
2763
+
2764
+ ComponentUtils.convertAllMultivaluedStringValuesToList($scope.mapperType.properties, mapper.config);
2765
+ ComponentUtils.addLastEmptyValueToMultivaluedLists($scope.mapperType.properties, mapper.config);
2766
+
2767
+ $scope.mapper = angular.copy(mapper);
2768
+
2769
+ $scope.$watch(function () {
2770
+ return $location.path();
2771
+ }, function() {
2772
+ $scope.path = $location.path().substring(1).split("/");
2773
+ });
2774
+
2775
+ $scope.$watch('mapper', function() {
2776
+ if (!angular.equals($scope.mapper, mapper)) {
2777
+ $scope.changed = true;
2778
+ }
2779
+ }, true);
2780
+
2781
+ $scope.save = function() {
2782
+ let mapperCopy = angular.copy($scope.mapper);
2783
+ ComponentUtils.convertAllListValuesToMultivaluedString($scope.mapperType.properties, mapperCopy.config);
2784
+
2785
+ IdentityProviderMapper.update({
2786
+ realm : realm.realm,
2787
+ alias : identityProvider.alias,
2788
+ mapperId : mapper.id
2789
+ }, mapperCopy, function () {
2790
+ $scope.changed = false;
2791
+ ComponentUtils.addLastEmptyValueToMultivaluedLists($scope.mapperType.properties, $scope.mapper.config);
2792
+ mapper = angular.copy($scope.mapper);
2793
+ $location.url("/realms/" + realm.realm + '/identity-provider-mappers/' + identityProvider.alias + "/mappers/" + mapper.id);
2794
+ Notifications.success("Your changes have been saved.");
2795
+ });
2796
+ };
2797
+
2798
+ $scope.reset = function() {
2799
+ $scope.mapper = angular.copy(mapper);
2800
+ $scope.changed = false;
2801
+ };
2802
+
2803
+ $scope.cancel = function() {
2804
+ //$location.url("/realms");
2805
+ window.history.back();
2806
+ };
2807
+
2808
+ $scope.remove = function() {
2809
+ Dialog.confirmDelete($scope.mapper.name, 'mapper', function() {
2810
+ IdentityProviderMapper.remove({ realm: realm.realm, alias: mapper.identityProviderAlias, mapperId : $scope.mapper.id }, function() {
2811
+ Notifications.success("The mapper has been deleted.");
2812
+ $location.url("/realms/" + realm.realm + '/identity-provider-mappers/' + identityProvider.alias + "/mappers");
2813
+ });
2814
+ });
2815
+ };
2816
+
2817
+ });
2818
+
2819
+ module.controller('IdentityProviderMapperCreateCtrl', function ($scope, realm, identityProvider, mapperTypes, IdentityProviderMapper, Notifications, Dialog, ComponentUtils, $location) {
2820
+ $scope.realm = realm;
2821
+ $scope.identityProvider = identityProvider;
2822
+ $scope.create = true;
2823
+ $scope.mapper = { identityProviderAlias: identityProvider.alias, config: {}};
2824
+ $scope.mapperTypes = mapperTypes;
2825
+
2826
+ // make first type the default
2827
+ $scope.mapperType = mapperTypes[Object.keys(mapperTypes)[0]];
2828
+ $scope.mapper.config.syncMode = 'INHERIT';
2829
+
2830
+ $scope.$watch(function() {
2831
+ return $location.path();
2832
+ }, function() {
2833
+ $scope.path = $location.path().substring(1).split("/");
2834
+ });
2835
+
2836
+ $scope.save = function () {
2837
+ $scope.mapper.identityProviderMapper = $scope.mapperType.id;
2838
+ let copyMapper = angular.copy($scope.mapper);
2839
+ ComponentUtils.convertAllListValuesToMultivaluedString($scope.mapperType.properties, copyMapper.config);
2840
+
2841
+ IdentityProviderMapper.save({
2842
+ realm : realm.realm,
2843
+ alias : identityProvider.alias
2844
+ }, copyMapper, function (data, headers) {
2845
+ var l = headers().location;
2846
+ var id = l.substring(l.lastIndexOf("/") + 1);
2847
+ $location.url("/realms/" + realm.realm + '/identity-provider-mappers/' + identityProvider.alias + "/mappers/" + id);
2848
+ Notifications.success("Mapper has been created.");
2849
+ });
2850
+ };
2851
+
2852
+ $scope.cancel = function() {
2853
+ //$location.url("/realms");
2854
+ window.history.back();
2855
+ };
2856
+
2857
+
2858
+ });
2859
+
2860
+ module.controller('RealmFlowBindingCtrl', function($scope, flows, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications) {
2861
+ $scope.flows = [];
2862
+ $scope.clientFlows = [];
2863
+ for (var i=0 ; i<flows.length ; i++) {
2864
+ if (flows[i].providerId == 'client-flow') {
2865
+ $scope.clientFlows.push(flows[i]);
2866
+ } else {
2867
+ $scope.flows.push(flows[i]);
2868
+ }
2869
+ }
2870
+
2871
+ $scope.profileInfo = serverInfo.profileInfo;
2872
+
2873
+ genericRealmUpdate($scope, Current, Realm, realm, serverInfo, $http, $route, Dialog, Notifications, "/realms/" + realm.realm + "/authentication/flow-bindings");
2874
+ });
2875
+
2876
+
2877
+ module.controller('CreateFlowCtrl', function($scope, realm,
2878
+ AuthenticationFlows,
2879
+ Notifications, $location) {
2880
+ console.debug('CreateFlowCtrl');
2881
+ $scope.realm = realm;
2882
+ $scope.flow = {
2883
+ alias: "",
2884
+ providerId: "basic-flow",
2885
+ description: "",
2886
+ topLevel: true,
2887
+ builtIn: false
2888
+ }
2889
+
2890
+ $scope.save = function() {
2891
+ AuthenticationFlows.save({realm: realm.realm, flow: ""}, $scope.flow, function() {
2892
+ $location.url("/realms/" + realm.realm + "/authentication/flows/" + $scope.flow.alias);
2893
+ Notifications.success("Flow Created.");
2894
+ })
2895
+ }
2896
+ $scope.cancel = function() {
2897
+ $location.url("/realms/" + realm.realm + "/authentication/flows");
2898
+ };
2899
+ });
2900
+
2901
+ module.controller('CreateExecutionFlowCtrl', function($scope, realm, parentFlow, formProviders,
2902
+ CreateExecutionFlow,
2903
+ Notifications, $location) {
2904
+ $scope.realm = realm;
2905
+ $scope.formProviders = formProviders;
2906
+
2907
+ var defaultFlowType = parentFlow.providerId == 'client-flow' ? 'client-flow' : 'basic-flow';
2908
+ $scope.flow = {
2909
+ alias: "",
2910
+ type: defaultFlowType,
2911
+ description: ""
2912
+ }
2913
+ $scope.provider = {};
2914
+ if (formProviders.length > 0) {
2915
+ $scope.provider = formProviders[0];
2916
+ }
2917
+
2918
+ $scope.save = function() {
2919
+ $scope.flow.provider = $scope.provider.id;
2920
+ CreateExecutionFlow.save({realm: realm.realm, alias: parentFlow.alias}, $scope.flow, function() {
2921
+ $location.url("/realms/" + realm.realm + "/authentication/flows");
2922
+ Notifications.success("Flow Created.");
2923
+ })
2924
+ }
2925
+ $scope.cancel = function() {
2926
+ $location.url("/realms/" + realm.realm + "/authentication/flows");
2927
+ };
2928
+ });
2929
+
2930
+ module.controller('CreateExecutionCtrl', function($scope, realm, parentFlow, formActionProviders, authenticatorProviders, clientAuthenticatorProviders,
2931
+ CreateExecution,
2932
+ Notifications, $location) {
2933
+ $scope.realm = realm;
2934
+ $scope.parentFlow = parentFlow;
2935
+
2936
+ if (parentFlow.providerId == 'form-flow') {
2937
+ $scope.providers = formActionProviders;
2938
+ } else if (parentFlow.providerId == 'client-flow') {
2939
+ $scope.providers = clientAuthenticatorProviders;
2940
+ } else {
2941
+ $scope.providers = authenticatorProviders;
2942
+ }
2943
+
2944
+ $scope.provider = {};
2945
+ if ($scope.providers.length > 0) {
2946
+ $scope.provider = $scope.providers[0];
2947
+ }
2948
+
2949
+ $scope.save = function() {
2950
+ var execution = {
2951
+ provider: $scope.provider.id
2952
+ }
2953
+ CreateExecution.save({realm: realm.realm, alias: parentFlow.alias}, execution, function() {
2954
+ $location.url("/realms/" + realm.realm + "/authentication/flows");
2955
+ Notifications.success("Execution Created.");
2956
+ })
2957
+ }
2958
+ $scope.cancel = function() {
2959
+ $location.url("/realms/" + realm.realm + "/authentication/flows");
2960
+ };
2961
+ });
2962
+
2963
+
2964
+
2965
+ module.controller('AuthenticationFlowsCtrl', function($scope, $route, realm, flows, selectedFlow, LastFlowSelected, Dialog,
2966
+ AuthenticationFlows, AuthenticationFlowsCopy, AuthenticationFlowsUpdate, AuthenticationFlowExecutions,
2967
+ AuthenticationExecution, AuthenticationExecutionRaisePriority, AuthenticationExecutionLowerPriority,
2968
+ $modal, Notifications, CopyDialog, UpdateDialog, $location) {
2969
+ $scope.realm = realm;
2970
+ $scope.flows = flows;
2971
+
2972
+ if (selectedFlow !== null) {
2973
+ LastFlowSelected.alias = selectedFlow;
2974
+ }
2975
+
2976
+ if (selectedFlow === null && LastFlowSelected.alias !== null) {
2977
+ selectedFlow = LastFlowSelected.alias;
2978
+ }
2979
+
2980
+ if (flows.length > 0) {
2981
+ $scope.flow = flows[0];
2982
+ if (selectedFlow) {
2983
+ for (var i = 0; i < flows.length; i++) {
2984
+ if (flows[i].alias == selectedFlow) {
2985
+ $scope.flow = flows[i];
2986
+ break;
2987
+ }
2988
+ }
2989
+ }
2990
+ }
2991
+
2992
+ $scope.selectFlow = function(flow) {
2993
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + flow.alias);
2994
+ };
2995
+
2996
+ var setupForm = function() {
2997
+ AuthenticationFlowExecutions.query({realm: realm.realm, alias: $scope.flow.alias}, function(data) {
2998
+ $scope.executions = data;
2999
+ $scope.choicesmax = 0;
3000
+ $scope.levelmax = 0;
3001
+ for (var i = 0; i < $scope.executions.length; i++ ) {
3002
+ var execution = $scope.executions[i];
3003
+ if (execution.requirementChoices.length > $scope.choicesmax) {
3004
+ $scope.choicesmax = execution.requirementChoices.length;
3005
+ }
3006
+ if (execution.level > $scope.levelmax) {
3007
+ $scope.levelmax = execution.level;
3008
+ }
3009
+ }
3010
+ $scope.levelmaxempties = [];
3011
+ for (j = 0; j < $scope.levelmax; j++) {
3012
+ $scope.levelmaxempties.push(j);
3013
+
3014
+ }
3015
+ for (var i = 0; i < $scope.executions.length; i++ ) {
3016
+ var execution = $scope.executions[i];
3017
+ execution.empties = [];
3018
+ for (j = 0; j < $scope.choicesmax - execution.requirementChoices.length; j++) {
3019
+ execution.empties.push(j);
3020
+ }
3021
+ execution.preLevels = [];
3022
+ for (j = 0; j < execution.level; j++) {
3023
+ execution.preLevels.push(j);
3024
+ }
3025
+ execution.postLevels = [];
3026
+ for (j = execution.level; j < $scope.levelmax; j++) {
3027
+ execution.postLevels.push(j);
3028
+ }
3029
+ }
3030
+ })
3031
+ };
3032
+
3033
+ $scope.copyFlow = function() {
3034
+ CopyDialog.open('Copy Authentication Flow', $scope.flow.alias, function(name) {
3035
+ AuthenticationFlowsCopy.save({realm: realm.realm, alias: $scope.flow.alias}, {
3036
+ newName: name
3037
+ }, function() {
3038
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + name);
3039
+ Notifications.success("Flow copied.");
3040
+ })
3041
+ })
3042
+ };
3043
+
3044
+ $scope.deleteFlow = function() {
3045
+ Dialog.confirmDelete($scope.flow.alias, 'flow', function() {
3046
+ $scope.removeFlow();
3047
+ });
3048
+ };
3049
+
3050
+ $scope.removeFlow = function() {
3051
+ console.log('Remove flow:' + $scope.flow.alias);
3052
+ if (realm.browserFlow == $scope.flow.alias) {
3053
+ Notifications.error("Cannot remove flow, it is currently being used as the browser flow.");
3054
+
3055
+ } else if (realm.registrationFlow == $scope.flow.alias) {
3056
+ Notifications.error("Cannot remove flow, it is currently being used as the registration flow.");
3057
+
3058
+ } else if (realm.directGrantFlow == $scope.flow.alias) {
3059
+ Notifications.error("Cannot remove flow, it is currently being used as the direct grant flow.");
3060
+
3061
+ } else if (realm.resetCredentialsFlow == $scope.flow.alias) {
3062
+ Notifications.error("Cannot remove flow, it is currently being used as the reset credentials flow.");
3063
+
3064
+ } else if (realm.clientAuthenticationFlow == $scope.flow.alias) {
3065
+ Notifications.error("Cannot remove flow, it is currently being used as the client authentication flow.");
3066
+
3067
+ } else if (realm.dockerAuthenticationFlow == $scope.flow.alias) {
3068
+ Notifications.error("Cannot remove flow, it is currently being used as the docker authentication flow.");
3069
+ } else {
3070
+ AuthenticationFlows.remove({realm: realm.realm, flow: $scope.flow.id}, function () {
3071
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + flows[0].alias);
3072
+ Notifications.success("Flow removed");
3073
+ })
3074
+ }
3075
+
3076
+ };
3077
+
3078
+ $scope.editFlow = function(flow) {
3079
+ var copy = angular.copy(flow);
3080
+ UpdateDialog.open('Update Authentication Flow', copy.alias, copy.description, function(name, desc) {
3081
+ copy.alias = name;
3082
+ copy.description = desc;
3083
+ AuthenticationFlowsUpdate.update({realm: realm.realm, flow: flow.id}, copy, function() {
3084
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + name);
3085
+ Notifications.success("Flow updated");
3086
+ });
3087
+ })
3088
+ };
3089
+
3090
+ $scope.addFlow = function() {
3091
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + $scope.flow.id + '/create/flow/execution/' + $scope.flow.id);
3092
+
3093
+ }
3094
+
3095
+ $scope.addSubFlow = function(execution) {
3096
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + execution.flowId + '/create/flow/execution/' + $scope.flow.alias);
3097
+
3098
+ }
3099
+
3100
+ $scope.addSubFlowExecution = function(execution) {
3101
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + execution.flowId + '/create/execution/' + $scope.flow.alias);
3102
+
3103
+ }
3104
+
3105
+ $scope.addExecution = function() {
3106
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + $scope.flow.id + '/create/execution/' + $scope.flow.id);
3107
+
3108
+ }
3109
+
3110
+ $scope.createFlow = function() {
3111
+ $location.url("/realms/" + realm.realm + '/authentication/create/flow');
3112
+ }
3113
+
3114
+ $scope.updateExecution = function(execution) {
3115
+ var copy = angular.copy(execution);
3116
+ delete copy.empties;
3117
+ delete copy.levels;
3118
+ delete copy.preLevels;
3119
+ delete copy.postLevels;
3120
+ AuthenticationFlowExecutions.update({realm: realm.realm, alias: $scope.flow.alias}, copy, function() {
3121
+ Notifications.success("Auth requirement updated");
3122
+ setupForm();
3123
+ });
3124
+
3125
+ };
3126
+
3127
+ $scope.editExecutionFlow = function(execution) {
3128
+ var copy = angular.copy(execution);
3129
+ delete copy.empties;
3130
+ delete copy.levels;
3131
+ delete copy.preLevels;
3132
+ delete copy.postLevels;
3133
+ UpdateDialog.open('Update Execution Flow', copy.displayName, copy.description, function(name, desc) {
3134
+ copy.displayName = name;
3135
+ copy.description = desc;
3136
+ AuthenticationFlowExecutions.update({realm: realm.realm, alias: $scope.flow.alias}, copy, function() {
3137
+ Notifications.success("Execution Flow updated");
3138
+ setupForm();
3139
+ });
3140
+ })
3141
+ };
3142
+
3143
+ $scope.removeExecution = function(execution) {
3144
+ console.log('removeExecution: ' + execution.id);
3145
+ var exeOrFlow = execution.authenticationFlow ? 'flow' : 'execution';
3146
+ Dialog.confirmDelete(execution.displayName, exeOrFlow, function() {
3147
+ AuthenticationExecution.remove({realm: realm.realm, execution: execution.id}, function() {
3148
+ Notifications.success("The " + exeOrFlow + " was removed.");
3149
+ setupForm();
3150
+ });
3151
+ });
3152
+
3153
+ }
3154
+
3155
+ $scope.raisePriority = function(execution) {
3156
+ AuthenticationExecutionRaisePriority.save({realm: realm.realm, execution: execution.id}, function() {
3157
+ Notifications.success("Priority raised");
3158
+ setupForm();
3159
+ })
3160
+ }
3161
+
3162
+ $scope.lowerPriority = function(execution) {
3163
+ AuthenticationExecutionLowerPriority.save({realm: realm.realm, execution: execution.id}, function() {
3164
+ Notifications.success("Priority lowered");
3165
+ setupForm();
3166
+ })
3167
+ }
3168
+
3169
+ $scope.setupForm = setupForm;
3170
+
3171
+ if (selectedFlow == null) {
3172
+ $scope.selectFlow(flows[0]);
3173
+ } else {
3174
+ setupForm();
3175
+ }
3176
+ });
3177
+
3178
+ module.controller('RequiredActionsCtrl', function($scope, realm, unregisteredRequiredActions,
3179
+ $modal, $route,
3180
+ RegisterRequiredAction, RequiredActions, RequiredActionRaisePriority, RequiredActionLowerPriority, Notifications) {
3181
+ console.log('RequiredActionsCtrl');
3182
+ $scope.realm = realm;
3183
+ $scope.unregisteredRequiredActions = unregisteredRequiredActions;
3184
+ $scope.requiredActions = [];
3185
+ var setupRequiredActionsForm = function() {
3186
+ console.log('setupRequiredActionsForm');
3187
+ RequiredActions.query({realm: realm.realm}, function(data) {
3188
+ $scope.requiredActions = [];
3189
+ for (var i = 0; i < data.length; i++) {
3190
+ $scope.requiredActions.push(data[i]);
3191
+ }
3192
+ });
3193
+ };
3194
+
3195
+ $scope.updateRequiredAction = function(action) {
3196
+ RequiredActions.update({realm: realm.realm, alias: action.alias}, action, function() {
3197
+ Notifications.success("Required action updated");
3198
+ setupRequiredActionsForm();
3199
+ });
3200
+ }
3201
+
3202
+ $scope.raisePriority = function(action) {
3203
+ RequiredActionRaisePriority.save({realm: realm.realm, alias: action.alias}, function() {
3204
+ Notifications.success("Required action's priority raised");
3205
+ setupRequiredActionsForm();
3206
+ })
3207
+ }
3208
+
3209
+ $scope.lowerPriority = function(action) {
3210
+ RequiredActionLowerPriority.save({realm: realm.realm, alias: action.alias}, function() {
3211
+ Notifications.success("Required action's priority lowered");
3212
+ setupRequiredActionsForm();
3213
+ })
3214
+ }
3215
+
3216
+ $scope.register = function() {
3217
+ var controller = function($scope, $modalInstance) {
3218
+ $scope.unregisteredRequiredActions = unregisteredRequiredActions;
3219
+ $scope.selected = {
3220
+ selected: $scope.unregisteredRequiredActions[0]
3221
+ }
3222
+ $scope.ok = function () {
3223
+ $modalInstance.close();
3224
+ RegisterRequiredAction.save({realm: realm.realm}, $scope.selected.selected, function() {
3225
+ $route.reload();
3226
+ });
3227
+ };
3228
+ $scope.cancel = function () {
3229
+ $modalInstance.dismiss('cancel');
3230
+ };
3231
+ }
3232
+ $modal.open({
3233
+ templateUrl: resourceUrl + '/partials/modal/unregistered-required-action-selector.html',
3234
+ controller: controller,
3235
+ resolve: {
3236
+ }
3237
+ });
3238
+ }
3239
+
3240
+ setupRequiredActionsForm();
3241
+
3242
+
3243
+ });
3244
+
3245
+ module.controller('AuthenticationConfigCtrl', function($scope, realm, flow, configType, config, AuthenticationConfig, Notifications,
3246
+ Dialog, $location, ComponentUtils) {
3247
+ $scope.realm = realm;
3248
+ $scope.flow = flow;
3249
+ $scope.configType = configType;
3250
+ $scope.create = false;
3251
+ $scope.config = angular.copy(config);
3252
+ $scope.changed = false;
3253
+
3254
+ $scope.$watch(function() {
3255
+ return $location.path();
3256
+ }, function() {
3257
+ $scope.path = $location.path().substring(1).split("/");
3258
+ });
3259
+
3260
+ $scope.$watch('config', function() {
3261
+ if (!angular.equals($scope.config, config)) {
3262
+ $scope.changed = true;
3263
+ }
3264
+ }, true);
3265
+
3266
+ $scope.save = function() {
3267
+ var configCopy = angular.copy($scope.config);
3268
+ ComponentUtils.convertAllListValuesToMultivaluedString(configType.properties, configCopy.config);
3269
+
3270
+ AuthenticationConfig.update({
3271
+ realm : realm.realm,
3272
+ config : config.id
3273
+ }, configCopy, function() {
3274
+ $scope.changed = false;
3275
+ config = angular.copy($scope.config);
3276
+ Notifications.success("Your changes have been saved.");
3277
+ $location.reload();
3278
+ });
3279
+ };
3280
+
3281
+ $scope.reset = function() {
3282
+ $scope.config = angular.copy(config);
3283
+ $scope.changed = false;
3284
+ };
3285
+
3286
+ $scope.cancel = function() {
3287
+ //$location.url("/realms");
3288
+ window.history.back();
3289
+ };
3290
+
3291
+ $scope.remove = function() {
3292
+ Dialog.confirmDelete($scope.config.alias, 'config', function() {
3293
+ AuthenticationConfig.remove({ realm: realm.realm, config : $scope.config.id }, function() {
3294
+ Notifications.success("The config has been deleted.");
3295
+ $location.url("/realms/" + realm.realm + '/authentication/flows/' + flow.id);
3296
+ });
3297
+ });
3298
+ };
3299
+
3300
+ });
3301
+
3302
+ module.controller('AuthenticationConfigCreateCtrl', function($scope, realm, flow, configType, execution, AuthenticationExecutionConfig,
3303
+ Notifications, Dialog, $location, ComponentUtils) {
3304
+ $scope.realm = realm;
3305
+ $scope.flow = flow;
3306
+ $scope.create = true;
3307
+ $scope.configType = configType;
3308
+
3309
+ var defaultConfig = {};
3310
+ if (configType && Array.isArray(configType.properties)) {
3311
+ for(var i = 0; i < configType.properties.length; i++) {
3312
+ var property = configType.properties[i];
3313
+ if (property && property.name) {
3314
+ defaultConfig[property.name] = property.defaultValue;
3315
+ }
3316
+ }
3317
+ }
3318
+
3319
+ $scope.config = { config: defaultConfig};
3320
+
3321
+ $scope.$watch(function() {
3322
+ return $location.path();
3323
+ }, function() {
3324
+ $scope.path = $location.path().substring(1).split("/");
3325
+ });
3326
+
3327
+ $scope.save = function() {
3328
+ var configCopy = angular.copy($scope.config);
3329
+ ComponentUtils.convertAllListValuesToMultivaluedString(configType.properties, configCopy.config);
3330
+
3331
+ AuthenticationExecutionConfig.save({
3332
+ realm : realm.realm,
3333
+ execution: execution
3334
+ }, configCopy, function(data, headers) {
3335
+ var l = headers().location;
3336
+ var id = l.substring(l.lastIndexOf("/") + 1);
3337
+ var url = "/realms/" + realm.realm + '/authentication/flows/' + flow.id + '/config/' + configType.providerId + "/" + id;
3338
+ console.log('redirect url: ' + url);
3339
+ $location.url(url);
3340
+ Notifications.success("Config has been created.");
3341
+ });
3342
+ };
3343
+
3344
+ $scope.cancel = function() {
3345
+ //$location.url("/realms");
3346
+ window.history.back();
3347
+ };
3348
+ });
3349
+
3350
+ module.controller('ClientInitialAccessCtrl', function($scope, realm, clientInitialAccess, ClientInitialAccess, Dialog, Notifications, $route, $location) {
3351
+ $scope.realm = realm;
3352
+ $scope.clientInitialAccess = clientInitialAccess;
3353
+
3354
+ $scope.remove = function(id) {
3355
+ Dialog.confirmDelete(id, 'initial access token', function() {
3356
+ ClientInitialAccess.remove({ realm: realm.realm, id: id }, function() {
3357
+ Notifications.success("The initial access token was deleted.");
3358
+ $route.reload();
3359
+ });
3360
+ });
3361
+ }
3362
+ });
3363
+
3364
+ module.controller('ClientInitialAccessCreateCtrl', function($scope, realm, ClientInitialAccess, TimeUnit, Dialog, $location, $translate) {
3365
+ $scope.expirationUnit = 'Days';
3366
+ $scope.expiration = TimeUnit.toUnit(0, $scope.expirationUnit);
3367
+ $scope.count = 1;
3368
+ $scope.realm = realm;
3369
+
3370
+ $scope.save = function() {
3371
+ var expiration = TimeUnit.toSeconds($scope.expiration, $scope.expirationUnit);
3372
+ ClientInitialAccess.save({
3373
+ realm: realm.realm
3374
+ }, { expiration: expiration, count: $scope.count}, function (data) {
3375
+ console.debug(data);
3376
+ $scope.id = data.id;
3377
+ $scope.token = data.token;
3378
+ });
3379
+ };
3380
+
3381
+ $scope.cancel = function() {
3382
+ $location.url('/realms/' + realm.realm + '/client-registration/client-initial-access');
3383
+ };
3384
+
3385
+ $scope.done = function() {
3386
+ var btns = {
3387
+ ok: {
3388
+ label: $translate.instant('continue'),
3389
+ cssClass: 'btn btn-primary'
3390
+ },
3391
+ cancel: {
3392
+ label: $translate.instant('cancel'),
3393
+ cssClass: 'btn btn-default'
3394
+ }
3395
+ }
3396
+
3397
+ var title = $translate.instant('initial-access-token.confirm.title');
3398
+ var message = $translate.instant('initial-access-token.confirm.text');
3399
+ Dialog.open(title, message, btns, function() {
3400
+ $location.url('/realms/' + realm.realm + '/client-registration/client-initial-access');
3401
+ });
3402
+ };
3403
+ });
3404
+
3405
+ module.controller('ClientRegPoliciesCtrl', function($scope, realm, clientRegistrationPolicyProviders, policies, Dialog, Notifications, Components, $route, $location) {
3406
+ $scope.realm = realm;
3407
+ $scope.providers = clientRegistrationPolicyProviders;
3408
+ $scope.anonPolicies = [];
3409
+ $scope.authPolicies = [];
3410
+ for (var i=0 ; i<policies.length ; i++) {
3411
+ var policy = policies[i];
3412
+ if (policy.subType === 'anonymous') {
3413
+ $scope.anonPolicies.push(policy);
3414
+ } else if (policy.subType === 'authenticated') {
3415
+ $scope.authPolicies.push(policy);
3416
+ } else {
3417
+ throw 'subType is required for clientRegistration policy component!';
3418
+ }
3419
+ }
3420
+
3421
+ $scope.addProvider = function(authType, provider) {
3422
+ console.log('Add provider: authType ' + authType + ', providerId: ' + provider.id);
3423
+ $location.url("/realms/" + realm.realm + "/client-registration/client-reg-policies/create/" + authType + '/' + provider.id);
3424
+ };
3425
+
3426
+ $scope.getInstanceLink = function(instance) {
3427
+ return "/realms/" + realm.realm + "/client-registration/client-reg-policies/" + instance.providerId + "/" + instance.id;
3428
+ }
3429
+
3430
+ $scope.removeInstance = function(instance) {
3431
+ Dialog.confirmDelete(instance.name, 'client registration policy', function() {
3432
+ Components.remove({
3433
+ realm : realm.realm,
3434
+ componentId : instance.id
3435
+ }, function() {
3436
+ $route.reload();
3437
+ Notifications.success("The policy has been deleted.");
3438
+ });
3439
+ });
3440
+ };
3441
+
3442
+ });
3443
+
3444
+ module.controller('ClientRegPolicyDetailCtrl', function ($scope, realm, clientRegistrationPolicyProviders, instance, Dialog, Notifications, Components, ComponentUtils, $route, $location, $translate) {
3445
+ $scope.realm = realm;
3446
+ $scope.instance = instance;
3447
+ $scope.providerTypes = clientRegistrationPolicyProviders;
3448
+
3449
+ for (let i = 0; i < $scope.providerTypes.length; i++) {
3450
+ let providerType = $scope.providerTypes[i];
3451
+ if (providerType.id === instance.providerId) {
3452
+ $scope.providerType = providerType;
3453
+ break;
3454
+ }
3455
+ }
3456
+
3457
+ $scope.create = !$scope.instance.name;
3458
+
3459
+ function toDefaultValue(configProperty) {
3460
+ if (configProperty.type === 'MultivaluedString' || configProperty.type === 'MultivaluedList') {
3461
+ if (configProperty.defaultValue) {
3462
+ return configProperty.defaultValue;
3463
+ } else {
3464
+ return [];
3465
+ }
3466
+ }
3467
+
3468
+ if (configProperty.defaultValue) {
3469
+ return [ configProperty.defaultValue ];
3470
+ } else {
3471
+ return [ '' ];
3472
+ }
3473
+ }
3474
+
3475
+ $translate($scope.instance.providerId + ".label")
3476
+ .then((translatedValue) => {
3477
+ $scope.headerTitle = translatedValue;
3478
+ }).catch(() => {
3479
+ $scope.headerTitle = $scope.instance.providerId;
3480
+ });
3481
+
3482
+ if ($scope.create) {
3483
+ $scope.instance.name = "";
3484
+ $scope.instance.parentId = realm.id;
3485
+ $scope.instance.config = {};
3486
+
3487
+ if ($scope.providerType.properties) {
3488
+
3489
+ for (let i = 0; i < $scope.providerType.properties.length; i++) {
3490
+ let configProperty = $scope.providerType.properties[i];
3491
+ $scope.instance.config[configProperty.name] = toDefaultValue(configProperty);
3492
+ }
3493
+ }
3494
+ }
3495
+
3496
+ if ($scope.providerType.properties) {
3497
+ ComponentUtils.addLastEmptyValueToMultivaluedLists($scope.providerType.properties, $scope.instance.config);
3498
+ ComponentUtils.addMvOptionsToMultivaluedLists($scope.providerType.properties);
3499
+ }
3500
+
3501
+ let oldCopy = angular.copy($scope.instance);
3502
+ $scope.changed = false;
3503
+
3504
+ $scope.$watch('instance', function() {
3505
+ if (!angular.equals($scope.instance, oldCopy)) {
3506
+ $scope.changed = true;
3507
+ }
3508
+ }, true);
3509
+
3510
+ $scope.reset = function() {
3511
+ $scope.create ? window.history.back() : $route.reload();
3512
+ };
3513
+
3514
+ $scope.hasValidValues = () => $scope.changed && $scope.instance.name;
3515
+
3516
+ $scope.save = function() {
3517
+ $scope.changed = false;
3518
+ if ($scope.create) {
3519
+ Components.save({realm: realm.realm}, $scope.instance, function (data, headers) {
3520
+ var l = headers().location;
3521
+ var id = l.substring(l.lastIndexOf("/") + 1);
3522
+ $location.url("/realms/" + realm.realm + "/client-registration/client-reg-policies/" + $scope.instance.providerId + "/" + id);
3523
+ Notifications.success("The policy has been created.");
3524
+ });
3525
+ } else {
3526
+ Components.update({realm: realm.realm,
3527
+ componentId: instance.id
3528
+ },
3529
+ $scope.instance, function () {
3530
+ $route.reload();
3531
+ Notifications.success("The policy has been updated.");
3532
+ });
3533
+ }
3534
+ };
3535
+
3536
+ });
3537
+
3538
+ module.controller('ClientPoliciesProfilesListCtrl', function($scope, realm, clientProfiles, ClientPoliciesProfiles, Dialog, Notifications, $route, $location) {
3539
+ console.log('ClientPoliciesProfilesListCtrl');
3540
+ $scope.realm = realm;
3541
+ $scope.clientProfiles = clientProfiles;
3542
+
3543
+ $scope.removeClientProfile = function(clientProfile) {
3544
+ Dialog.confirmDelete(clientProfile.name, 'client profile', function() {
3545
+ console.log("Deleting client profile from the JSON: " + clientProfile.name);
3546
+
3547
+ for (var i = 0; i < $scope.clientProfiles.profiles.length; i++) {
3548
+ var currentProfile = $scope.clientProfiles.profiles[i];
3549
+ if (currentProfile.name === clientProfile.name) {
3550
+ $scope.clientProfiles.profiles.splice(i, 1);
3551
+ break;
3552
+ }
3553
+ }
3554
+
3555
+ ClientPoliciesProfiles.update({
3556
+ realm: realm.realm,
3557
+ }, $scope.clientProfiles, function () {
3558
+ $route.reload();
3559
+ Notifications.success("The client profile was deleted.");
3560
+ }, function (errorResponse) {
3561
+ $route.reload();
3562
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
3563
+ Notifications.error('Failed to delete client profile: ' + errDetails);
3564
+ });
3565
+ });
3566
+ };
3567
+
3568
+ });
3569
+
3570
+ module.controller('ClientPoliciesProfilesJsonCtrl', function($scope, realm, clientProfiles, ClientPoliciesProfiles, Dialog, Notifications, $route, $location) {
3571
+ console.log('ClientPoliciesProfilesJsonCtrl');
3572
+ $scope.realm = realm;
3573
+ $scope.clientProfilesString = angular.toJson(clientProfiles, true);
3574
+
3575
+ $scope.save = function() {
3576
+ var clientProfilesObj = null;
3577
+ try {
3578
+ clientProfilesObj = angular.fromJson($scope.clientProfilesString);
3579
+ } catch (e) {
3580
+ Notifications.error("Provided JSON is incorrect: " + e.message);
3581
+ console.log(e);
3582
+ return;
3583
+ }
3584
+ var clientProfilesCompressed = angular.toJson(clientProfilesObj, false);
3585
+
3586
+ ClientPoliciesProfiles.update({
3587
+ realm: realm.realm,
3588
+ }, clientProfilesCompressed, function () {
3589
+ $route.reload();
3590
+ Notifications.success("The client profiles configuration was updated.");
3591
+ }, function(errorResponse) {
3592
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
3593
+ Notifications.error("Failed to update client profiles: " + errDetails);
3594
+ console.log("Error response when updating client profiles JSON: Status: " + errorResponse.status +
3595
+ ", statusText: " + errorResponse.statusText + ", data: " + JSON.stringify(errorResponse.data));
3596
+ });
3597
+ };
3598
+
3599
+ $scope.reset = function() {
3600
+ $route.reload();
3601
+ };
3602
+
3603
+ });
3604
+
3605
+ module.controller('ClientPoliciesProfilesEditCtrl', function($scope, realm, clientProfiles, ClientPoliciesProfiles, Dialog, Notifications, $route, $location) {
3606
+ var targetProfileName = $route.current.params.profileName;
3607
+ $scope.createNew = targetProfileName == null;
3608
+ if ($scope.createNew) {
3609
+ console.log('ClientPoliciesProfilesEditCtrl: creating new profile');
3610
+ } else {
3611
+ console.log('ClientPoliciesProfilesEditCtrl: updating profile ' + targetProfileName);
3612
+ }
3613
+
3614
+ $scope.realm = realm;
3615
+ $scope.editedProfile = null;
3616
+
3617
+ function getProfileByName(profilesArray) {
3618
+ if (!profilesArray) return null;
3619
+ for (var i=0 ; i < profilesArray.length ; i++) {
3620
+ var currentProfile = profilesArray[i];
3621
+ if (targetProfileName === currentProfile.name) {
3622
+ return currentProfile;
3623
+ }
3624
+ }
3625
+ }
3626
+
3627
+ if ($scope.createNew) {
3628
+ $scope.editedProfile = {
3629
+ name: "",
3630
+ executors: []
3631
+ };
3632
+ } else {
3633
+ var globalProfile = false;
3634
+ $scope.editedProfile = getProfileByName(clientProfiles.profiles);
3635
+ if (!$scope.editedProfile) {
3636
+ $scope.editedProfile = getProfileByName(clientProfiles.globalProfiles);
3637
+ globalProfile = true;
3638
+ }
3639
+
3640
+ if ($scope.editedProfile == null) {
3641
+ console.log("Profile of name " + targetProfileName + " not found");
3642
+ throw 'Profile not found';
3643
+ }
3644
+ }
3645
+
3646
+ // needs to be a function because when this controller runs, the permissions might not be loaded yet
3647
+ $scope.isReadOnly = function() {
3648
+ return !$scope.access.manageRealm || globalProfile;
3649
+ }
3650
+
3651
+ $scope.removeExecutor = function(executorIndex) {
3652
+ Dialog.confirmDelete($scope.editedProfile.executors[executorIndex].executor, 'executor', function() {
3653
+ console.log("remove executor of index " + executorIndex);
3654
+
3655
+ // Delete executor
3656
+ $scope.editedProfile.executors.splice(executorIndex, 1);
3657
+
3658
+ ClientPoliciesProfiles.update({
3659
+ realm: realm.realm,
3660
+ }, clientProfiles, function () {
3661
+ Notifications.success("The executor was deleted.");
3662
+ }, function (errorResponse) {
3663
+ $route.reload();
3664
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
3665
+ Notifications.error('Failed to delete executor: ' + errDetails);
3666
+ });
3667
+ });
3668
+ }
3669
+
3670
+ $scope.save = function() {
3671
+ if (!$scope.editedProfile.name || $scope.editedProfile.name === '') {
3672
+ Notifications.error('Name must be provided');
3673
+ return;
3674
+ }
3675
+
3676
+ if ($scope.createNew) {
3677
+ clientProfiles.profiles.push($scope.editedProfile);
3678
+ }
3679
+
3680
+ ClientPoliciesProfiles.update({
3681
+ realm: realm.realm,
3682
+ }, clientProfiles, function () {
3683
+ if ($scope.createNew) {
3684
+ Notifications.success("The client profile was created.");
3685
+ $location.url('/realms/' + realm.realm + '/client-policies/profiles-update/' + $scope.editedProfile.name);
3686
+ } else {
3687
+ Notifications.success("The client profile was updated.");
3688
+ $location.url('/realms/' + realm.realm + '/client-policies/profiles');
3689
+ }
3690
+ }, function(errorResponse) {
3691
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
3692
+ if ($scope.createNew) {
3693
+ Notifications.error('Failed to create client profile: ' + errDetails);
3694
+ } else {
3695
+ Notifications.error('Failed to update client profile: ' + errDetails);
3696
+ }
3697
+ });
3698
+
3699
+ };
3700
+
3701
+ $scope.back = function() {
3702
+ $location.url('/realms/' + realm.realm + '/client-policies/profiles');
3703
+ };
3704
+
3705
+ });
3706
+
3707
+ module.controller('ClientPoliciesProfilesEditExecutorCtrl', function($scope, realm, serverInfo, clientProfiles, ClientPoliciesProfiles, ComponentUtils, Dialog, Notifications, $route, $location) {
3708
+ var updatedExecutorIndex = $route.current.params.executorIndex;
3709
+ var targetProfileName = $route.current.params.profileName;
3710
+ $scope.createNew = updatedExecutorIndex == null;
3711
+ if ($scope.createNew) {
3712
+ console.log('ClientPoliciesProfilesEditExecutorCtrl: adding executor to profile ' + targetProfileName);
3713
+ } else {
3714
+ console.log('ClientPoliciesProfilesEditExecutorCtrl: updating executor with index ' + updatedExecutorIndex + ' of profile ' + targetProfileName);
3715
+ }
3716
+ $scope.realm = realm;
3717
+
3718
+ function getProfileByName(profilesArray) {
3719
+ if (!profilesArray) return null;
3720
+ for (var i=0 ; i < profilesArray.length ; i++) {
3721
+ var currentProfile = profilesArray[i];
3722
+ if (targetProfileName === currentProfile.name) {
3723
+ return currentProfile;
3724
+ }
3725
+ }
3726
+ }
3727
+
3728
+ var globalProfile = false;
3729
+ $scope.editedProfile = getProfileByName(clientProfiles.profiles);
3730
+ if (!$scope.editedProfile) {
3731
+ $scope.editedProfile = getProfileByName(clientProfiles.globalProfiles);
3732
+ globalProfile = true;
3733
+ }
3734
+ if ($scope.editedProfile == null) {
3735
+ throw 'Client profile of specified name not found';
3736
+ }
3737
+
3738
+ // needs to be a function because when this controller runs, the permissions might not be loaded yet
3739
+ $scope.isReadOnly = function() {
3740
+ return !$scope.access.manageRealm || globalProfile;
3741
+ }
3742
+
3743
+ $scope.executorTypes = serverInfo.componentTypes['org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider'];
3744
+
3745
+ for (var j=0 ; j < $scope.executorTypes.length ; j++) {
3746
+ var currExecutorType = $scope.executorTypes[j];
3747
+ if (currExecutorType.properties) {
3748
+ console.log("Adjusting executorType: " + currExecutorType.id);
3749
+ ComponentUtils.addMvOptionsToMultivaluedLists(currExecutorType.properties);
3750
+ }
3751
+ }
3752
+
3753
+ function getExecutorByIndex(clientProfile, executorIndex) {
3754
+ if (clientProfile.executors.length <= executorIndex) {
3755
+ console.error('Client profile does not have executor of specified index');
3756
+ $location.path('/notfound');
3757
+ return null;
3758
+ } else {
3759
+ return clientProfile.executors[executorIndex];
3760
+ }
3761
+ }
3762
+
3763
+ if ($scope.createNew) {
3764
+ // make first type the default
3765
+ $scope.executorType = $scope.executorTypes[0];
3766
+ var oldExecutorType = $scope.executorType;
3767
+ initConfig();
3768
+
3769
+ $scope.$watch('executorType', function() {
3770
+ if (!angular.equals($scope.executorType, oldExecutorType)) {
3771
+ oldExecutorType = $scope.executorType;
3772
+ initConfig();
3773
+ }
3774
+ }, true);
3775
+ } else {
3776
+ var exec = getExecutorByIndex($scope.editedProfile, updatedExecutorIndex);
3777
+ if (exec) {
3778
+ // a failsafe in case the configuration was deleted entirely (or set to null) in the JSON view
3779
+ if (!exec.configuration) {
3780
+ exec.configuration = {}
3781
+ }
3782
+
3783
+ $scope.executor = {
3784
+ config: exec.configuration
3785
+ };
3786
+
3787
+ $scope.executorType = null;
3788
+ for (var j=0 ; j < $scope.executorTypes.length ; j++) {
3789
+ var currentExType = $scope.executorTypes[j];
3790
+ if (exec.executor === currentExType.id) {
3791
+ $scope.executorType = currentExType;
3792
+ break;
3793
+ }
3794
+ }
3795
+
3796
+ for (var j=0 ; j < $scope.executorType.properties.length ; j++) {
3797
+ // Convert boolean properties from the configuration to strings as expected by the kc-provider-config directive
3798
+ var currentProperty = $scope.executorType.properties[j];
3799
+ if (currentProperty.type === 'boolean') {
3800
+ $scope.executor.config[currentProperty.name] = ($scope.executor.config[currentProperty.name]) ? "true" : "false";
3801
+ }
3802
+
3803
+ // a workaround for select2 to prevent displaying empty boxes
3804
+ var configProperty = $scope.executor.config[$scope.executorType.properties[j].name];
3805
+ if (Array.isArray(configProperty) && configProperty.length === 0) {
3806
+ $scope.executor.config[$scope.executorType.properties[j].name] = null
3807
+ }
3808
+
3809
+ }
3810
+ }
3811
+
3812
+ }
3813
+
3814
+ function toDefaultValue(configProperty) {
3815
+ if (configProperty.type === 'boolean') {
3816
+ return (configProperty.defaultValue) ? "true" : "false";
3817
+ }
3818
+
3819
+ if (configProperty.defaultValue !== undefined) {
3820
+ if ((configProperty.type === 'MultivaluedString' || configProperty.type === 'MultivaluedList') && !Array.isArray(configProperty.defaultValue)) {
3821
+ return [configProperty.defaultValue]
3822
+ }
3823
+ return configProperty.defaultValue;
3824
+ } else {
3825
+ return null;
3826
+ }
3827
+ }
3828
+
3829
+ function initConfig() {
3830
+ console.log("Initialized config now. ConfigType is: " + $scope.executorType.id);
3831
+ $scope.executor = {
3832
+ config: {}
3833
+ };
3834
+
3835
+ for (let i = 0; i < $scope.executorType.properties.length; i++) {
3836
+ let configProperty = $scope.executorType.properties[i];
3837
+ $scope.executor.config[configProperty.name] = toDefaultValue(configProperty);
3838
+ }
3839
+ }
3840
+
3841
+ $scope.save = function() {
3842
+ console.log("save: " + $scope.executorType.id);
3843
+
3844
+ var executorName = $scope.executorType.id;
3845
+ if (!$scope.editedProfile.executors) {
3846
+ $scope.editedProfile.executors = [];
3847
+ }
3848
+
3849
+ ComponentUtils.removeLastEmptyValue($scope.executor.config);
3850
+
3851
+ // Convert String properties required by the kc-provider-config directive back to booleans
3852
+ for (var j=0 ; j < $scope.executorType.properties.length ; j++) {
3853
+ var currentProperty = $scope.executorType.properties[j];
3854
+ if (currentProperty.type === 'boolean') {
3855
+ $scope.executor.config[currentProperty.name] = ($scope.executor.config[currentProperty.name] === "true") ? true : false;
3856
+ }
3857
+ }
3858
+
3859
+ if ($scope.createNew) {
3860
+ var selectedExecutor = {
3861
+ executor: $scope.executorType.id,
3862
+ configuration: $scope.executor.config
3863
+ };
3864
+ $scope.executors = $scope.editedProfile.executors.map((ex) => ex); //clone current executors
3865
+ $scope.editedProfile.executors.push(selectedExecutor);
3866
+ } else {
3867
+ var currentExecutor = getExecutorByIndex($scope.editedProfile, updatedExecutorIndex);
3868
+ if (currentExecutor) {
3869
+ currentExecutor.configuration = $scope.executor.config;
3870
+ }
3871
+ }
3872
+
3873
+ ClientPoliciesProfiles.update({
3874
+ realm: realm.realm,
3875
+ }, clientProfiles, function () {
3876
+ if ($scope.createNew) {
3877
+ Notifications.success("Executor created successfully");
3878
+ } else {
3879
+ Notifications.success("Executor updated successfully");
3880
+ }
3881
+ $location.url('/realms/' + realm.realm + '/client-policies/profiles-update/' + $scope.editedProfile.name);
3882
+ }, function(errorResponse) {
3883
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
3884
+ if ($scope.createNew) {
3885
+ $scope.editedProfile.executors = $scope.executors.map((ex) => ex);
3886
+ $scope.executors = undefined;
3887
+ Notifications.error('Failed to create executor: ' + errDetails);
3888
+ } else {
3889
+ Notifications.error('Failed to update executor: ' + errDetails);
3890
+ }
3891
+ });
3892
+
3893
+ };
3894
+
3895
+ $scope.cancel = function() {
3896
+ $location.url('/realms/' + realm.realm + '/client-policies/profiles-update/' + $scope.editedProfile.name);
3897
+ };
3898
+
3899
+ });
3900
+
3901
+ module.controller('ClientPoliciesListCtrl', function($scope, realm, clientPolicies, ClientPolicies, Dialog, Notifications, $route, $location) {
3902
+ console.log('ClientPoliciesListCtrl');
3903
+ $scope.realm = realm;
3904
+ $scope.clientPolicies = clientPolicies;
3905
+
3906
+ $scope.removeClientPolicy = function(clientPolicy) {
3907
+ Dialog.confirmDelete(clientPolicy.name, 'client policy', function() {
3908
+ console.log("Deleting client policy from the JSON: " + clientPolicy.name);
3909
+
3910
+ for (var i = 0; i < $scope.clientPolicies.policies.length; i++) {
3911
+ var currentPolicy = $scope.clientPolicies.policies[i];
3912
+ if (currentPolicy.name === clientPolicy.name) {
3913
+ $scope.clientPolicies.policies.splice(i, 1);
3914
+ break;
3915
+ }
3916
+ }
3917
+
3918
+ ClientPolicies.update({
3919
+ realm: realm.realm,
3920
+ }, $scope.clientPolicies, function () {
3921
+ $route.reload();
3922
+ Notifications.success("The client policy was deleted.");
3923
+ }, function (errorResponse) {
3924
+ $route.reload();
3925
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
3926
+ Notifications.error('Failed to delete client policy: ' + errDetails);
3927
+ });
3928
+ });
3929
+ };
3930
+
3931
+ });
3932
+
3933
+ module.controller('ClientPoliciesJsonCtrl', function($scope, realm, clientPolicies, Dialog, Notifications, ClientPolicies, $route, $location) {
3934
+ console.log('ClientPoliciesJsonCtrl');
3935
+ $scope.realm = realm;
3936
+ $scope.clientPoliciesString = angular.toJson(clientPolicies, true);
3937
+
3938
+ $scope.save = function() {
3939
+ var clientPoliciesObj = null;
3940
+ try {
3941
+ var clientPoliciesObj = angular.fromJson($scope.clientPoliciesString);
3942
+ } catch (e) {
3943
+ Notifications.error("Provided JSON is incorrect: " + e.message);
3944
+ console.log(e);
3945
+ return;
3946
+ }
3947
+ var clientPoliciesCompressed = angular.toJson(clientPoliciesObj, false);
3948
+
3949
+ ClientPolicies.update({
3950
+ realm: realm.realm,
3951
+ }, clientPoliciesCompressed, function () {
3952
+ $route.reload();
3953
+ Notifications.success("The client policies configuration was updated.");
3954
+ }, function(errorResponse) {
3955
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
3956
+ Notifications.error("Failed to update client policies: " + errDetails);
3957
+ console.log("Error response when updating client policies JSON: Status: " + errorResponse.status +
3958
+ ", statusText: " + errorResponse.statusText + ", data: " + JSON.stringify(errorResponse.data));
3959
+ });
3960
+ };
3961
+
3962
+ $scope.reset = function() {
3963
+ $route.reload();
3964
+ };
3965
+ });
3966
+
3967
+ module.controller('ClientPoliciesEditCtrl', function($scope, realm, clientProfiles, clientPolicies, ClientPolicies, Dialog, Notifications, $route, $location) {
3968
+ var targetPolicyName = $route.current.params.policyName;
3969
+ $scope.createNew = targetPolicyName == null;
3970
+ if ($scope.createNew) {
3971
+ console.log('ClientPoliciesEditCtrl: creating new policy');
3972
+ } else {
3973
+ console.log('ClientPoliciesEditCtrl: updating policy ' + targetPolicyName);
3974
+ }
3975
+
3976
+ $scope.realm = realm;
3977
+ $scope.clientPolicies = clientPolicies;
3978
+ $scope.clientProfiles = clientProfiles;
3979
+ $scope.editedPolicy = null;
3980
+
3981
+ if ($scope.createNew) {
3982
+ $scope.editedPolicy = {
3983
+ name: "",
3984
+ enabled: true,
3985
+ profiles: [],
3986
+ conditions: []
3987
+ };
3988
+ } else {
3989
+ for (var i=0 ; i < $scope.clientPolicies.policies.length ; i++) {
3990
+ var currentPolicy = $scope.clientPolicies.policies[i];
3991
+ if (targetPolicyName === currentPolicy.name) {
3992
+ $scope.editedPolicy = currentPolicy;
3993
+ break;
3994
+ }
3995
+ }
3996
+
3997
+ if ($scope.editedPolicy == null) {
3998
+ console.log("Policy of name " + targetPolicyName + " not found");
3999
+ throw 'Policy not found';
4000
+ }
4001
+ }
4002
+
4003
+ // needs to be a function because when this controller runs, the permissions might not be loaded yet
4004
+ $scope.isReadOnly = function() {
4005
+ return !$scope.access.manageRealm;
4006
+ }
4007
+
4008
+ $scope.availableProfiles = [];
4009
+ var allClientProfiles = clientProfiles.profiles;
4010
+ if (clientProfiles.globalProfiles) {
4011
+ allClientProfiles = allClientProfiles.concat(clientProfiles.globalProfiles);
4012
+ }
4013
+ for (var k=0 ; k<allClientProfiles.length ; k++) {
4014
+ var profileName = allClientProfiles[k].name;
4015
+ if (!$scope.editedPolicy.profiles || !$scope.editedPolicy.profiles.includes(profileName)) {
4016
+ $scope.availableProfiles.push(profileName);
4017
+ }
4018
+ }
4019
+
4020
+ $scope.removeCondition = function(conditionIndex) {
4021
+ Dialog.confirmDelete($scope.editedPolicy.conditions[conditionIndex].condition, 'condition', function() {
4022
+ console.log("remove condition of index " + conditionIndex);
4023
+
4024
+ // Delete condition
4025
+ $scope.editedPolicy.conditions.splice(conditionIndex, 1);
4026
+
4027
+ ClientPolicies.update({
4028
+ realm: realm.realm,
4029
+ }, $scope.clientPolicies, function () {
4030
+ Notifications.success("The condition was deleted.");
4031
+ }, function (errorResponse) {
4032
+ $route.reload();
4033
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
4034
+ Notifications.error('Failed to delete condition: ' + errDetails);
4035
+ });
4036
+ });
4037
+ }
4038
+
4039
+ $scope.save = function() {
4040
+ if (!$scope.editedPolicy.name || $scope.editedPolicy.name === '') {
4041
+ Notifications.error('Name must be provided');
4042
+ return;
4043
+ }
4044
+
4045
+ if ($scope.createNew) {
4046
+ $scope.clientPolicies.policies.push($scope.editedPolicy);
4047
+ }
4048
+
4049
+ ClientPolicies.update({
4050
+ realm: realm.realm,
4051
+ }, $scope.clientPolicies, function () {
4052
+ if ($scope.createNew) {
4053
+ Notifications.success("The client policy was created.");
4054
+ $location.url('/realms/' + realm.realm + '/client-policies/policies-update/' + $scope.editedPolicy.name);
4055
+ } else {
4056
+ Notifications.success("The client policy was updated.");
4057
+ $location.url('/realms/' + realm.realm + '/client-policies/policies');
4058
+ }
4059
+ }, function(errorResponse) {
4060
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
4061
+ if ($scope.createNew) {
4062
+ Notifications.error('Failed to create client policy: ' + errDetails);
4063
+ } else {
4064
+ Notifications.error('Failed to update client policy: ' + errDetails);
4065
+ }
4066
+ });
4067
+
4068
+ };
4069
+
4070
+ $scope.back = function() {
4071
+ $location.url('/realms/' + realm.realm + '/client-policies/policies');
4072
+ };
4073
+
4074
+
4075
+ function moveProfileAndUpdatePolicy(arrayFrom, arrayTo, profileName, notificationsMessage) {
4076
+ for (var i=0 ; i<arrayFrom.length ; i++) {
4077
+ if (arrayFrom[i] === profileName) {
4078
+ arrayFrom.splice(i, 1);
4079
+ arrayTo.push(profileName);
4080
+ break;
4081
+ }
4082
+ }
4083
+
4084
+ ClientPolicies.update({
4085
+ realm: realm.realm,
4086
+ }, $scope.clientPolicies, function () {
4087
+ Notifications.success(notificationsMessage);
4088
+ }, function(errorResponse) {
4089
+ $route.reload();
4090
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
4091
+ Notifications.error('Failed to update profiles of the policy: ' + errDetails);
4092
+ });
4093
+ }
4094
+
4095
+ $scope.addProfile = function(profileName) {
4096
+ console.log("addProfile: " + profileName);
4097
+ moveProfileAndUpdatePolicy($scope.availableProfiles, $scope.editedPolicy.profiles, profileName, "Profile added to the policy");
4098
+ };
4099
+
4100
+ $scope.removeProfile = function(profileName) {
4101
+ console.log("removeProfile: " + profileName);
4102
+ moveProfileAndUpdatePolicy( $scope.editedPolicy.profiles, $scope.availableProfiles, profileName, "Profile removed from the policy");
4103
+ }
4104
+
4105
+ });
4106
+
4107
+ module.controller('ClientPoliciesEditConditionCtrl', function($scope, realm, serverInfo, clientPolicies, ClientPolicies, Components, ComponentUtils, Dialog, Notifications, $route, $location) {
4108
+ var updatedConditionIndex = $route.current.params.conditionIndex;
4109
+ var targetPolicyName = $route.current.params.policyName;
4110
+ $scope.createNew = updatedConditionIndex == null;
4111
+ if ($scope.createNew) {
4112
+ console.log('ClientPoliciesEditConditionCtrl: adding condition to policy ' + targetPolicyName);
4113
+ } else {
4114
+ console.log('ClientPoliciesEditConditionCtrl: updating condition with index ' + updatedConditionIndex + ' of policy ' + targetPolicyName);
4115
+ }
4116
+ $scope.realm = realm;
4117
+
4118
+ $scope.editedPolicy = null;
4119
+ for (var i=0 ; i < clientPolicies.policies.length ; i++) {
4120
+ var currentPolicy = clientPolicies.policies[i];
4121
+ if (targetPolicyName === currentPolicy.name) {
4122
+ $scope.editedPolicy = currentPolicy;
4123
+ break;
4124
+ }
4125
+ }
4126
+ if ($scope.editedPolicy == null) {
4127
+ throw 'Client policy of specified name not found';
4128
+ }
4129
+
4130
+ // needs to be a function because when this controller runs, the permissions might not be loaded yet
4131
+ $scope.isReadOnly = function() {
4132
+ return !$scope.access.manageRealm;
4133
+ }
4134
+
4135
+ $scope.conditionTypes = serverInfo.componentTypes['org.keycloak.services.clientpolicy.condition.ClientPolicyConditionProvider'];
4136
+
4137
+ for (var j=0 ; j < $scope.conditionTypes.length ; j++) {
4138
+ var currConditionType = $scope.conditionTypes[j];
4139
+ if (currConditionType.properties) {
4140
+ console.log("Adjusting conditionType: " + currConditionType.id);
4141
+ ComponentUtils.addMvOptionsToMultivaluedLists(currConditionType.properties);
4142
+ }
4143
+ }
4144
+
4145
+ function getConditionByIndex(clientPolicy, conditionIndex) {
4146
+ if (clientPolicy.conditions.length <= conditionIndex) {
4147
+ console.error('Client policy does not have condition of specified index');
4148
+ $location.path('/notfound');
4149
+ return null;
4150
+ } else {
4151
+ return clientPolicy.conditions[conditionIndex];
4152
+ }
4153
+ }
4154
+
4155
+ if ($scope.createNew) {
4156
+ // make first type the default
4157
+ $scope.conditionType = $scope.conditionTypes[0];
4158
+ var oldConditionType = $scope.conditionType;
4159
+ initConfig();
4160
+
4161
+ $scope.$watch('conditionType', function() {
4162
+ if (!angular.equals($scope.conditionType, oldConditionType)) {
4163
+ oldConditionType = $scope.conditionType;
4164
+ initConfig();
4165
+ }
4166
+ }, true);
4167
+ } else {
4168
+ var cond = getConditionByIndex($scope.editedPolicy, updatedConditionIndex);
4169
+ if (cond) {
4170
+ // a failsafe in case the configuration was deleted entirely (or set to null) in the JSON view
4171
+ if (!cond.configuration) {
4172
+ cond.configuration = {}
4173
+ }
4174
+
4175
+ $scope.condition = {
4176
+ config: cond.configuration
4177
+ };
4178
+
4179
+ $scope.conditionType = null;
4180
+ for (var j=0 ; j < $scope.conditionTypes.length ; j++) {
4181
+ var currentCndType = $scope.conditionTypes[j];
4182
+ if (cond.condition === currentCndType.id) {
4183
+ $scope.conditionType = currentCndType;
4184
+ break;
4185
+ }
4186
+ }
4187
+
4188
+ for (var j=0 ; j < $scope.conditionType.properties.length ; j++) {
4189
+ // Convert boolean properties from the configuration to strings as expected by the kc-provider-config directive
4190
+ var currentProperty = $scope.conditionType.properties[j];
4191
+ if (currentProperty.type === 'boolean') {
4192
+ $scope.condition.config[currentProperty.name] = ($scope.condition.config[currentProperty.name]) ? "true" : "false";
4193
+ }
4194
+
4195
+ // a workaround for select2 to prevent displaying empty boxes
4196
+ var configProperty = $scope.condition.config[$scope.conditionType.properties[j].name];
4197
+ if (Array.isArray(configProperty) && configProperty.length === 0) {
4198
+ $scope.condition.config[$scope.conditionType.properties[j].name] = null
4199
+ }
4200
+
4201
+ }
4202
+ }
4203
+
4204
+ }
4205
+
4206
+ function toDefaultValue(configProperty) {
4207
+ if (configProperty.type === 'boolean') {
4208
+ return (configProperty.defaultValue) ? "true" : "false";
4209
+ }
4210
+
4211
+ if (configProperty.defaultValue !== undefined) {
4212
+ if ((configProperty.type === 'MultivaluedString' || configProperty.type === 'MultivaluedList') && !Array.isArray(configProperty.defaultValue)) {
4213
+ return [configProperty.defaultValue]
4214
+ }
4215
+ return configProperty.defaultValue;
4216
+ } else {
4217
+ return null;
4218
+ }
4219
+ }
4220
+
4221
+ function initConfig() {
4222
+ console.log("Initialized config now. ConfigType is: " + $scope.conditionType.id);
4223
+ $scope.condition = {
4224
+ config: {}
4225
+ };
4226
+
4227
+ for (let i = 0; i < $scope.conditionType.properties.length; i++) {
4228
+ let configProperty = $scope.conditionType.properties[i];
4229
+ $scope.condition.config[configProperty.name] = toDefaultValue(configProperty);
4230
+ }
4231
+ }
4232
+
4233
+
4234
+ $scope.save = function() {
4235
+ console.log("save: " + $scope.conditionType.id);
4236
+
4237
+ var conditionName = $scope.conditionType.id;
4238
+ if (!$scope.editedPolicy.conditions) {
4239
+ $scope.editedPolicy.conditions = [];
4240
+ }
4241
+
4242
+ ComponentUtils.removeLastEmptyValue($scope.condition.config);
4243
+
4244
+ // Convert String properties required by the kc-provider-config directive back to booleans
4245
+ for (var j=0 ; j < $scope.conditionType.properties.length ; j++) {
4246
+ var currentProperty = $scope.conditionType.properties[j];
4247
+ if (currentProperty.type === 'boolean') {
4248
+ $scope.condition.config[currentProperty.name] = ($scope.condition.config[currentProperty.name] === "true") ? true : false;
4249
+ }
4250
+ }
4251
+
4252
+ var selectedCondition;
4253
+ if ($scope.createNew) {
4254
+ var selectedCondition = {
4255
+ condition: $scope.conditionType.id,
4256
+ configuration: $scope.condition.config
4257
+ };
4258
+ $scope.editedPolicy.conditions.push(selectedCondition);
4259
+ } else {
4260
+ var currentCondition = getConditionByIndex($scope.editedPolicy, updatedConditionIndex);
4261
+ if (currentCondition) {
4262
+ currentCondition.configuration = $scope.condition.config;
4263
+ }
4264
+ }
4265
+
4266
+ ClientPolicies.update({
4267
+ realm: realm.realm,
4268
+ }, clientPolicies, function () {
4269
+ if ($scope.createNew) {
4270
+ Notifications.success("Condition created successfully");
4271
+ } else {
4272
+ Notifications.success("Condition updated successfully");
4273
+ }
4274
+ $location.url('/realms/' + realm.realm + '/client-policies/policies-update/' + $scope.editedPolicy.name);
4275
+ }, function(errorResponse) {
4276
+ var errDetails = (!errorResponse.data.errorMessage) ? "unknown error, please see the server log" : errorResponse.data.errorMessage
4277
+ if ($scope.createNew) {
4278
+ Notifications.error('Failed to create condition: ' + errDetails);
4279
+ } else {
4280
+ Notifications.error('Failed to update condition: ' + errDetails);
4281
+ }
4282
+ });
4283
+
4284
+ };
4285
+
4286
+ $scope.cancel = function() {
4287
+ $location.url('/realms/' + realm.realm + '/client-policies/policies-update/' + $scope.editedPolicy.name);
4288
+ };
4289
+
4290
+ });
4291
+
4292
+ module.controller('RealmImportCtrl', function($scope, realm, $route,
4293
+ Notifications, $modal, $resource) {
4294
+ $scope.rawContent = {};
4295
+ $scope.fileContent = {
4296
+ enabled: true
4297
+ };
4298
+ $scope.changed = false;
4299
+ $scope.files = [];
4300
+ $scope.realm = realm;
4301
+ $scope.overwrite = false;
4302
+ $scope.skip = false;
4303
+ $scope.importUsers = false;
4304
+ $scope.importGroups = false;
4305
+ $scope.importClients = false;
4306
+ $scope.importIdentityProviders = false;
4307
+ $scope.importRealmRoles = false;
4308
+ $scope.importClientRoles = false;
4309
+ $scope.ifResourceExists='FAIL';
4310
+ $scope.isMultiRealm = false;
4311
+ $scope.results = {};
4312
+ $scope.currentPage = 0;
4313
+ var pageSize = 15;
4314
+
4315
+ var oldCopy = angular.copy($scope.fileContent);
4316
+
4317
+ $scope.importFile = function($fileContent){
4318
+ var parsed;
4319
+ try {
4320
+ parsed = JSON.parse($fileContent);
4321
+ } catch (e) {
4322
+ Notifications.error('Unable to parse JSON file.');
4323
+ return;
4324
+ }
4325
+
4326
+ $scope.rawContent = angular.copy(parsed);
4327
+ if (($scope.rawContent instanceof Array) && ($scope.rawContent.length > 0)) {
4328
+ if ($scope.rawContent.length > 1) $scope.isMultiRealm = true;
4329
+ $scope.fileContent = $scope.rawContent[0];
4330
+ } else {
4331
+ $scope.fileContent = $scope.rawContent;
4332
+ }
4333
+
4334
+ $scope.importing = true;
4335
+ setOnOffSwitchDefaults();
4336
+ $scope.results = {};
4337
+ if (!$scope.hasResources()) {
4338
+ $scope.nothingToImport();
4339
+ }
4340
+ };
4341
+
4342
+ $scope.hasResults = function() {
4343
+ return (Object.keys($scope.results).length > 0) &&
4344
+ ($scope.results.results !== undefined) &&
4345
+ ($scope.results.results.length > 0);
4346
+ }
4347
+
4348
+ $scope.resultsPage = function() {
4349
+ if (!$scope.hasResults()) return {};
4350
+ return $scope.results.results.slice(startIndex(), endIndex());
4351
+ }
4352
+
4353
+ function startIndex() {
4354
+ return pageSize * $scope.currentPage;
4355
+ }
4356
+
4357
+ function endIndex() {
4358
+ var length = $scope.results.results.length;
4359
+ var endIndex = startIndex() + pageSize;
4360
+ if (endIndex > length) endIndex = length;
4361
+ return endIndex;
4362
+ }
4363
+
4364
+ function setOnOffSwitchDefaults() {
4365
+ $scope.importUsers = $scope.hasArray('users');
4366
+ $scope.importGroups = $scope.hasArray('groups');
4367
+ $scope.importClients = $scope.hasArray('clients');
4368
+ $scope.importIdentityProviders = $scope.hasArray('identityProviders');
4369
+ $scope.importRealmRoles = $scope.hasRealmRoles();
4370
+ $scope.importClientRoles = $scope.hasClientRoles();
4371
+ }
4372
+
4373
+ $scope.setFirstPage = function() {
4374
+ $scope.currentPage = 0;
4375
+ }
4376
+
4377
+ $scope.setNextPage = function() {
4378
+ $scope.currentPage++;
4379
+ }
4380
+
4381
+ $scope.setPreviousPage = function() {
4382
+ $scope.currentPage--;
4383
+ }
4384
+
4385
+ $scope.hasNext = function() {
4386
+ if (!$scope.hasResults()) return false;
4387
+ var length = $scope.results.results.length;
4388
+ //console.log('length=' + length);
4389
+ var endIndex = startIndex() + pageSize;
4390
+ //console.log('endIndex=' + endIndex);
4391
+ return length > endIndex;
4392
+ }
4393
+
4394
+ $scope.hasPrevious = function() {
4395
+ if (!$scope.hasResults()) return false;
4396
+ return $scope.currentPage > 0;
4397
+ }
4398
+
4399
+ $scope.viewImportDetails = function() {
4400
+ $modal.open({
4401
+ templateUrl: resourceUrl + '/partials/modal/view-object.html',
4402
+ controller: 'ObjectModalCtrl',
4403
+ resolve: {
4404
+ object: function () {
4405
+ return $scope.fileContent;
4406
+ }
4407
+ }
4408
+ })
4409
+ };
4410
+
4411
+ $scope.hasArray = function(section) {
4412
+ return ($scope.fileContent !== 'undefined') &&
4413
+ ($scope.fileContent.hasOwnProperty(section)) &&
4414
+ ($scope.fileContent[section] instanceof Array) &&
4415
+ ($scope.fileContent[section].length > 0);
4416
+ }
4417
+
4418
+ $scope.hasRealmRoles = function() {
4419
+ return $scope.hasRoles() &&
4420
+ ($scope.fileContent.roles.hasOwnProperty('realm')) &&
4421
+ ($scope.fileContent.roles.realm instanceof Array) &&
4422
+ ($scope.fileContent.roles.realm.length > 0);
4423
+ }
4424
+
4425
+ $scope.hasRoles = function() {
4426
+ return ($scope.fileContent !== 'undefined') &&
4427
+ ($scope.fileContent.hasOwnProperty('roles')) &&
4428
+ ($scope.fileContent.roles !== 'undefined');
4429
+ }
4430
+
4431
+ $scope.hasClientRoles = function() {
4432
+ return $scope.hasRoles() &&
4433
+ ($scope.fileContent.roles.hasOwnProperty('client')) &&
4434
+ (Object.keys($scope.fileContent.roles.client).length > 0);
4435
+ }
4436
+
4437
+ $scope.itemCount = function(section) {
4438
+ if (!$scope.importing) return 0;
4439
+ if ($scope.hasRealmRoles() && (section === 'roles.realm')) return $scope.fileContent.roles.realm.length;
4440
+ if ($scope.hasClientRoles() && (section === 'roles.client')) return clientRolesCount($scope.fileContent.roles.client);
4441
+
4442
+ if (!$scope.fileContent.hasOwnProperty(section)) return 0;
4443
+
4444
+ return $scope.fileContent[section].length;
4445
+ }
4446
+
4447
+ clientRolesCount = function(clientRoles) {
4448
+ var total = 0;
4449
+ for (var clientName in clientRoles) {
4450
+ total += clientRoles[clientName].length;
4451
+ }
4452
+ return total;
4453
+ }
4454
+
4455
+ $scope.hasResources = function() {
4456
+ return ($scope.importUsers && $scope.hasArray('users')) ||
4457
+ ($scope.importGroups && $scope.hasArray('groups')) ||
4458
+ ($scope.importClients && $scope.hasArray('clients')) ||
4459
+ ($scope.importIdentityProviders && $scope.hasArray('identityProviders')) ||
4460
+ ($scope.importRealmRoles && $scope.hasRealmRoles()) ||
4461
+ ($scope.importClientRoles && $scope.hasClientRoles());
4462
+ }
4463
+
4464
+ $scope.nothingToImport = function() {
4465
+ Notifications.error('No resources specified to import.');
4466
+ }
4467
+
4468
+ $scope.$watch('fileContent', function() {
4469
+ if (!angular.equals($scope.fileContent, oldCopy)) {
4470
+ $scope.changed = true;
4471
+ }
4472
+ setOnOffSwitchDefaults();
4473
+ }, true);
4474
+
4475
+ $scope.successMessage = function() {
4476
+ var message = $scope.results.added + ' records added. ';
4477
+ if ($scope.ifResourceExists === 'SKIP') {
4478
+ message += $scope.results.skipped + ' records skipped.'
4479
+ }
4480
+ if ($scope.ifResourceExists === 'OVERWRITE') {
4481
+ message += $scope.results.overwritten + ' records overwritten.';
4482
+ }
4483
+ return message;
4484
+ }
4485
+
4486
+ $scope.save = function() {
4487
+ var json = angular.copy($scope.fileContent);
4488
+ json.ifResourceExists = $scope.ifResourceExists;
4489
+ if (!$scope.importUsers) delete json.users;
4490
+ if (!$scope.importGroups) delete json.groups;
4491
+ if (!$scope.importIdentityProviders) delete json.identityProviders;
4492
+ if (!$scope.importClients) delete json.clients;
4493
+
4494
+ if (json.hasOwnProperty('roles')) {
4495
+ if (!$scope.importRealmRoles) delete json.roles.realm;
4496
+ if (!$scope.importClientRoles) delete json.roles.client;
4497
+ }
4498
+
4499
+ var importFile = $resource(authUrl + '/admin/realms/' + realm.realm + '/partialImport');
4500
+ $scope.results = importFile.save(json, function() {
4501
+ Notifications.success($scope.successMessage());
4502
+ }, function(error) {
4503
+ if (error.data.errorMessage) {
4504
+ Notifications.error(error.data.errorMessage);
4505
+ } else {
4506
+ Notifications.error('Unexpected error during import');
4507
+ }
4508
+ });
4509
+ };
4510
+
4511
+ $scope.reset = function() {
4512
+ $route.reload();
4513
+ }
4514
+
4515
+ });
4516
+
4517
+ module.controller('RealmExportCtrl', function($scope, realm, $http,
4518
+ $httpParamSerializer, Notifications, Dialog) {
4519
+ $scope.realm = realm;
4520
+ $scope.exportGroupsAndRoles = false;
4521
+ $scope.exportClients = false;
4522
+
4523
+ $scope.export = function() {
4524
+ if ($scope.exportGroupsAndRoles || $scope.exportClients) {
4525
+ Dialog.confirm('Export', 'This operation may make server unresponsive for a while.\n\nAre you sure you want to proceed?', download);
4526
+ } else {
4527
+ download();
4528
+ }
4529
+ }
4530
+
4531
+ function download() {
4532
+ var exportUrl = authUrl + '/admin/realms/' + realm.realm + '/partial-export';
4533
+ var params = {};
4534
+ if ($scope.exportGroupsAndRoles) {
4535
+ params['exportGroupsAndRoles'] = true;
4536
+ }
4537
+ if ($scope.exportClients) {
4538
+ params['exportClients'] = true;
4539
+ }
4540
+ if (Object.keys(params).length > 0) {
4541
+ exportUrl += '?' + $httpParamSerializer(params);
4542
+ }
4543
+ $http.post(exportUrl)
4544
+ .then(function(response) {
4545
+ var download = angular.fromJson(response.data);
4546
+ download = angular.toJson(download, true);
4547
+ saveAs(new Blob([download], { type: 'application/json' }), 'realm-export.json');
4548
+ }).catch(function() {
4549
+ Notifications.error("Sorry, something went wrong.");
4550
+ });
4551
+ }
4552
+ });