keycloakify 10.0.0-rc.17 → 10.0.0-rc.18

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 (205) hide show
  1. package/PUBLIC_URL.js.map +1 -1
  2. package/account/Template.js +5 -5
  3. package/account/Template.js.map +1 -1
  4. package/account/i18n/i18n.js +37 -29
  5. package/account/i18n/i18n.js.map +1 -1
  6. package/account/kcContext/KcContext.js.map +1 -1
  7. package/account/kcContext/createGetKcContext.js +20 -15
  8. package/account/kcContext/createGetKcContext.js.map +1 -1
  9. package/account/kcContext/getKcContext.js.map +1 -1
  10. package/account/kcContext/getKcContextFromWindow.d.ts +3 -1
  11. package/account/kcContext/getKcContextFromWindow.js.map +1 -1
  12. package/account/kcContext/kcContextMocks.js +148 -144
  13. package/account/kcContext/kcContextMocks.js.map +1 -1
  14. package/account/lib/useGetClassName.js +14 -14
  15. package/account/lib/useGetClassName.js.map +1 -1
  16. package/account/pages/Account.js +1 -1
  17. package/account/pages/Account.js.map +1 -1
  18. package/account/pages/Password.js +7 -7
  19. package/account/pages/Password.js.map +1 -1
  20. package/account/pages/Totp.js +4 -4
  21. package/account/pages/Totp.js.map +1 -1
  22. package/bin/main.js +2066 -2165
  23. package/bin/shared/constants.d.ts +1 -0
  24. package/bin/shared/constants.js +4 -3
  25. package/bin/shared/constants.js.map +1 -1
  26. package/lib/isStorybook.js +2 -1
  27. package/lib/isStorybook.js.map +1 -1
  28. package/lib/useGetClassName.js.map +1 -1
  29. package/login/Template.js +13 -13
  30. package/login/Template.js.map +1 -1
  31. package/login/UserProfileFormFields.js +43 -41
  32. package/login/UserProfileFormFields.js.map +1 -1
  33. package/login/i18n/baseMessages/ca.d.ts +1 -1
  34. package/login/i18n/baseMessages/ca.js +1 -1
  35. package/login/i18n/baseMessages/el.d.ts +0 -1
  36. package/login/i18n/baseMessages/el.js +0 -1
  37. package/login/i18n/baseMessages/el.js.map +1 -1
  38. package/login/i18n/baseMessages/en.d.ts +1 -1
  39. package/login/i18n/baseMessages/en.js +1 -1
  40. package/login/i18n/baseMessages/es.d.ts +1 -1
  41. package/login/i18n/baseMessages/es.js +1 -1
  42. package/login/i18n/baseMessages/fa.d.ts +0 -1
  43. package/login/i18n/baseMessages/fa.js +0 -1
  44. package/login/i18n/baseMessages/fa.js.map +1 -1
  45. package/login/i18n/baseMessages/hu.d.ts +1 -1
  46. package/login/i18n/baseMessages/hu.js +1 -1
  47. package/login/i18n/baseMessages/index.d.ts +1 -2
  48. package/login/i18n/baseMessages/zh-CN.d.ts +1 -1
  49. package/login/i18n/baseMessages/zh-CN.js +1 -1
  50. package/login/i18n/i18n.js +39 -31
  51. package/login/i18n/i18n.js.map +1 -1
  52. package/login/kcContext/KcContext.js.map +1 -1
  53. package/login/kcContext/createGetKcContext.js +30 -22
  54. package/login/kcContext/createGetKcContext.js.map +1 -1
  55. package/login/kcContext/getKcContext.js.map +1 -1
  56. package/login/kcContext/getKcContextFromWindow.d.ts +3 -1
  57. package/login/kcContext/getKcContextFromWindow.js.map +1 -1
  58. package/login/kcContext/kcContextMocks.js +233 -231
  59. package/login/kcContext/kcContextMocks.js.map +1 -1
  60. package/login/lib/useDownloadTerms.js.map +1 -1
  61. package/login/lib/useGetClassName.js +112 -112
  62. package/login/lib/useGetClassName.js.map +1 -1
  63. package/login/lib/useUserProfileForm.js +181 -181
  64. package/login/lib/useUserProfileForm.js.map +1 -1
  65. package/login/pages/DeleteAccountConfirm.js +5 -1
  66. package/login/pages/DeleteAccountConfirm.js.map +1 -1
  67. package/login/pages/FrontchannelLogout.js +1 -1
  68. package/login/pages/FrontchannelLogout.js.map +1 -1
  69. package/login/pages/Login.js.map +1 -1
  70. package/login/pages/LoginRecoveryAuthnCodeConfig.js +3 -3
  71. package/login/pages/LoginRecoveryAuthnCodeConfig.js.map +1 -1
  72. package/login/pages/LoginResetPassword.js.map +1 -1
  73. package/login/pages/LoginUsername.js.map +1 -1
  74. package/login/pages/WebauthnAuthenticate.js +11 -8
  75. package/login/pages/WebauthnAuthenticate.js.map +1 -1
  76. package/login/pages/WebauthnRegister.js +7 -7
  77. package/login/pages/WebauthnRegister.js.map +1 -1
  78. package/package.json +230 -226
  79. package/src/PUBLIC_URL.ts +4 -1
  80. package/src/account/Template.tsx +5 -5
  81. package/src/account/TemplateProps.ts +4 -1
  82. package/src/account/i18n/i18n.tsx +40 -30
  83. package/src/account/kcContext/KcContext.ts +4 -1
  84. package/src/account/kcContext/createGetKcContext.ts +48 -22
  85. package/src/account/kcContext/getKcContext.ts +3 -1
  86. package/src/account/kcContext/getKcContextFromWindow.ts +6 -2
  87. package/src/account/kcContext/kcContextMocks.ts +164 -160
  88. package/src/account/lib/useGetClassName.ts +15 -14
  89. package/src/account/pages/Account.tsx +2 -2
  90. package/src/account/pages/Password.tsx +8 -8
  91. package/src/account/pages/Totp.tsx +4 -6
  92. package/src/bin/copy-keycloak-resources-to-public.ts +2 -2
  93. package/src/bin/download-keycloak-default-theme.ts +30 -8
  94. package/src/bin/eject-page.ts +48 -11
  95. package/src/bin/initialize-email-theme.ts +25 -17
  96. package/src/bin/keycloakify/buildJars/buildJar.ts +179 -104
  97. package/src/bin/keycloakify/buildJars/buildJars.ts +35 -16
  98. package/src/bin/keycloakify/buildJars/extensionVersions.ts +2 -1
  99. package/src/bin/keycloakify/buildJars/generatePom.ts +11 -3
  100. package/src/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.ts +33 -8
  101. package/src/bin/keycloakify/generateFtl/generateFtl.ts +49 -12
  102. package/src/bin/keycloakify/generateSrcMainResources/bringInAccountV1.ts +29 -18
  103. package/src/bin/keycloakify/generateSrcMainResources/generateMessageProperties.ts +35 -12
  104. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +3 -1
  105. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts +86 -41
  106. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +39 -15
  107. package/src/bin/keycloakify/generateSrcMainResources/readExtraPageNames.ts +21 -7
  108. package/src/bin/keycloakify/generateSrcMainResources/readFieldNameUsage.ts +34 -7
  109. package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +19 -5
  110. package/src/bin/keycloakify/keycloakify.ts +28 -9
  111. package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +24 -5
  112. package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +6 -2
  113. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +6 -3
  114. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +24 -6
  115. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +49 -11
  116. package/src/bin/main.ts +78 -41
  117. package/src/bin/shared/KeycloakVersionRange.ts +3 -1
  118. package/src/bin/shared/buildOptions.ts +70 -43
  119. package/src/bin/shared/constants.ts +4 -2
  120. package/src/bin/shared/copyKeycloakResourcesToPublic.ts +27 -13
  121. package/src/bin/shared/downloadKeycloakDefaultTheme.ts +161 -218
  122. package/src/bin/shared/downloadKeycloakStaticResources.ts +25 -21
  123. package/src/bin/shared/getJarFileBasename.ts +3 -1
  124. package/src/bin/shared/getThemeSrcDirPath.ts +5 -2
  125. package/src/bin/shared/metaInfKeycloakThemes.ts +35 -8
  126. package/src/bin/shared/promptKeycloakVersion.ts +33 -14
  127. package/src/bin/start-keycloak/index.ts +1 -0
  128. package/src/bin/start-keycloak/myrealm-realm-23.json +2142 -0
  129. package/src/bin/start-keycloak/myrealm-realm-24.json +2318 -0
  130. package/src/bin/start-keycloak/start-keycloak.ts +467 -0
  131. package/src/bin/tools/SemVer.ts +32 -13
  132. package/src/bin/tools/String.prototype.replaceAll.ts +9 -2
  133. package/src/bin/tools/crawl.ts +4 -1
  134. package/src/bin/tools/crc32.ts +42 -24
  135. package/src/bin/tools/downloadAndExtractArchive/downloadAndExtractArchive.ts +262 -0
  136. package/src/bin/tools/downloadAndExtractArchive/fetchProxyOptions.ts +96 -0
  137. package/src/bin/tools/downloadAndExtractArchive/index.ts +1 -0
  138. package/src/bin/tools/extractArchive.ts +120 -0
  139. package/src/bin/tools/fetchProxyOptions.ts +31 -8
  140. package/src/bin/tools/getAbsoluteAndInOsFormatPath.ts +10 -2
  141. package/src/bin/tools/getNpmWorkspaceRootDirPath.ts +18 -5
  142. package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +8 -2
  143. package/src/bin/tools/octokit-addons/listTags.ts +15 -4
  144. package/src/bin/tools/partitionPromiseSettledResults.ts +12 -3
  145. package/src/bin/tools/readThisNpmPackageVersion.ts +5 -1
  146. package/src/bin/tools/transformCodebase.ts +29 -10
  147. package/src/bin/tools/trimIndent.ts +4 -1
  148. package/src/lib/isStorybook.ts +3 -1
  149. package/src/lib/useGetClassName.ts +12 -3
  150. package/src/login/Template.tsx +14 -14
  151. package/src/login/TemplateProps.ts +4 -1
  152. package/src/login/UserProfileFormFields.tsx +44 -42
  153. package/src/login/i18n/baseMessages/ca.ts +1 -1
  154. package/src/login/i18n/baseMessages/el.ts +0 -1
  155. package/src/login/i18n/baseMessages/en.ts +1 -1
  156. package/src/login/i18n/baseMessages/es.ts +1 -1
  157. package/src/login/i18n/baseMessages/fa.ts +0 -1
  158. package/src/login/i18n/baseMessages/hu.ts +1 -1
  159. package/src/login/i18n/baseMessages/zh-CN.ts +1 -1
  160. package/src/login/i18n/i18n.tsx +42 -32
  161. package/src/login/kcContext/KcContext.ts +8 -2
  162. package/src/login/kcContext/createGetKcContext.ts +84 -37
  163. package/src/login/kcContext/getKcContext.ts +3 -1
  164. package/src/login/kcContext/getKcContextFromWindow.ts +6 -2
  165. package/src/login/kcContext/kcContextMocks.ts +339 -325
  166. package/src/login/lib/useDownloadTerms.ts +6 -4
  167. package/src/login/lib/useGetClassName.ts +119 -112
  168. package/src/login/lib/useUserProfileForm.tsx +219 -205
  169. package/src/login/pages/DeleteAccountConfirm.tsx +9 -3
  170. package/src/login/pages/FrontchannelLogout.tsx +1 -1
  171. package/src/login/pages/Login.tsx +2 -2
  172. package/src/login/pages/LoginRecoveryAuthnCodeConfig.tsx +3 -3
  173. package/src/login/pages/LoginResetPassword.tsx +2 -2
  174. package/src/login/pages/LoginUsername.tsx +2 -2
  175. package/src/login/pages/WebauthnAuthenticate.tsx +11 -8
  176. package/src/login/pages/WebauthnRegister.tsx +7 -7
  177. package/src/tools/AndByDiscriminatingKey.ts +12 -6
  178. package/src/tools/Array.prototype.every.ts +4 -1
  179. package/src/tools/LazyOrNot.ts +3 -1
  180. package/src/tools/clsx.ts +7 -1
  181. package/src/tools/deepAssign.ts +15 -8
  182. package/src/tools/deepClone.ts +3 -1
  183. package/src/tools/formatNumber.ts +4 -1
  184. package/src/tools/useConstCallback.ts +3 -1
  185. package/src/tools/useInsertLinkTags.ts +20 -7
  186. package/src/tools/useInsertScriptTags.ts +7 -2
  187. package/src/tools/useSetClassName.ts +4 -1
  188. package/src/vite-plugin/vite-plugin.ts +45 -21
  189. package/tools/Array.prototype.every.js +2 -1
  190. package/tools/Array.prototype.every.js.map +1 -1
  191. package/tools/clsx.js.map +1 -1
  192. package/tools/deepAssign.js +9 -7
  193. package/tools/deepAssign.js.map +1 -1
  194. package/tools/deepClone.js.map +1 -1
  195. package/tools/formatNumber.js.map +1 -1
  196. package/tools/useConstCallback.js.map +1 -1
  197. package/tools/useInsertLinkTags.js +5 -4
  198. package/tools/useInsertLinkTags.js.map +1 -1
  199. package/tools/useInsertScriptTags.js +5 -2
  200. package/tools/useInsertScriptTags.js.map +1 -1
  201. package/tools/useSetClassName.js.map +1 -1
  202. package/vite-plugin/index.js +975 -1651
  203. package/src/bin/shared/downloadAndUnzip.ts +0 -203
  204. package/src/bin/start-keycloak.ts +0 -309
  205. package/src/bin/tools/unzip.ts +0 -141
@@ -5,241 +5,241 @@ import { assert } from "tsafe/assert";
5
5
  import { BASE_URL } from "../../lib/BASE_URL";
6
6
  const attributes = [
7
7
  {
8
- "validators": {
9
- "length": {
8
+ validators: {
9
+ length: {
10
10
  "ignore.empty.value": true,
11
- "min": "3",
12
- "max": "255"
11
+ min: "3",
12
+ max: "255"
13
13
  }
14
14
  },
15
- "displayName": "${username}",
16
- "annotations": {},
17
- "required": true,
18
- "autocomplete": "username",
19
- "readOnly": false,
20
- "name": "username",
21
- "value": "xxxx"
15
+ displayName: "${username}",
16
+ annotations: {},
17
+ required: true,
18
+ autocomplete: "username",
19
+ readOnly: false,
20
+ name: "username",
21
+ value: "xxxx"
22
22
  },
23
23
  {
24
- "validators": {
25
- "length": {
26
- "max": "255",
24
+ validators: {
25
+ length: {
26
+ max: "255",
27
27
  "ignore.empty.value": true
28
28
  },
29
- "email": {
29
+ email: {
30
30
  "ignore.empty.value": true
31
31
  },
32
- "pattern": {
32
+ pattern: {
33
33
  "ignore.empty.value": true,
34
- "pattern": "gmail\\.com$"
34
+ pattern: "gmail\\.com$"
35
35
  }
36
36
  },
37
- "displayName": "${email}",
38
- "annotations": {},
39
- "required": true,
40
- "autocomplete": "email",
41
- "readOnly": false,
42
- "name": "email"
37
+ displayName: "${email}",
38
+ annotations: {},
39
+ required: true,
40
+ autocomplete: "email",
41
+ readOnly: false,
42
+ name: "email"
43
43
  },
44
44
  {
45
- "validators": {
46
- "length": {
47
- "max": "255",
45
+ validators: {
46
+ length: {
47
+ max: "255",
48
48
  "ignore.empty.value": true
49
49
  }
50
50
  },
51
- "displayName": "${firstName}",
52
- "annotations": {},
53
- "required": true,
54
- "readOnly": false,
55
- "name": "firstName"
51
+ displayName: "${firstName}",
52
+ annotations: {},
53
+ required: true,
54
+ readOnly: false,
55
+ name: "firstName"
56
56
  },
57
57
  {
58
- "validators": {
59
- "length": {
60
- "max": "255",
58
+ validators: {
59
+ length: {
60
+ max: "255",
61
61
  "ignore.empty.value": true
62
62
  }
63
63
  },
64
- "displayName": "${lastName}",
65
- "annotations": {},
66
- "required": true,
67
- "readOnly": false,
68
- "name": "lastName"
64
+ displayName: "${lastName}",
65
+ annotations: {},
66
+ required: true,
67
+ readOnly: false,
68
+ name: "lastName"
69
69
  }
70
70
  ];
71
71
  const attributesByName = Object.fromEntries(attributes.map(attribute => [attribute.name, attribute]));
72
72
  const resourcesPath = `${BASE_URL}${keycloak_resources}/login/resources`;
73
73
  export const kcContextCommonMock = {
74
- "themeVersion": "0.0.0",
75
- "keycloakifyVersion": "0.0.0",
76
- "themeType": "login",
77
- "themeName": "my-theme-name",
78
- "url": {
79
- "loginAction": "#",
74
+ themeVersion: "0.0.0",
75
+ keycloakifyVersion: "0.0.0",
76
+ themeType: "login",
77
+ themeName: "my-theme-name",
78
+ url: {
79
+ loginAction: "#",
80
80
  resourcesPath,
81
- "resourcesCommonPath": `${resourcesPath}/${resources_common}`,
82
- "loginRestartFlowUrl": "/auth/realms/myrealm/login-actions/restart?client_id=account&tab_id=HoAx28ja4xg",
83
- "loginUrl": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg",
84
- "ssoLoginInOtherTabsUrl": "/auth/realms/myrealm/login-actions/switch?client_id=account&tab_id=HoAx28ja4xg"
81
+ resourcesCommonPath: `${resourcesPath}/${resources_common}`,
82
+ loginRestartFlowUrl: "/auth/realms/myrealm/login-actions/restart?client_id=account&tab_id=HoAx28ja4xg",
83
+ loginUrl: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg",
84
+ ssoLoginInOtherTabsUrl: "/auth/realms/myrealm/login-actions/switch?client_id=account&tab_id=HoAx28ja4xg"
85
85
  },
86
- "realm": {
87
- "name": "myrealm",
88
- "displayName": "myrealm",
89
- "displayNameHtml": "myrealm",
90
- "internationalizationEnabled": true,
91
- "registrationEmailAsUsername": false
86
+ realm: {
87
+ name: "myrealm",
88
+ displayName: "myrealm",
89
+ displayNameHtml: "myrealm",
90
+ internationalizationEnabled: true,
91
+ registrationEmailAsUsername: false
92
92
  },
93
- "messagesPerField": {
94
- "printIfExists": () => {
93
+ messagesPerField: {
94
+ printIfExists: () => {
95
95
  return undefined;
96
96
  },
97
- "existsError": () => false,
98
- "get": fieldName => `Fake error for ${fieldName}`,
99
- "exists": () => false,
100
- "getFirstError": fieldName => `Fake error for ${fieldName}`
97
+ existsError: () => false,
98
+ get: fieldName => `Fake error for ${fieldName}`,
99
+ exists: () => false,
100
+ getFirstError: fieldName => `Fake error for ${fieldName}`
101
101
  },
102
- "locale": {
103
- "supported": [
102
+ locale: {
103
+ supported: [
104
104
  /* spell-checker: disable */
105
105
  {
106
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=de",
107
- "label": "Deutsch",
108
- "languageTag": "de"
106
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=de",
107
+ label: "Deutsch",
108
+ languageTag: "de"
109
109
  },
110
110
  {
111
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=no",
112
- "label": "Norsk",
113
- "languageTag": "no"
111
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=no",
112
+ label: "Norsk",
113
+ languageTag: "no"
114
114
  },
115
115
  {
116
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=ru",
117
- "label": "Русский",
118
- "languageTag": "ru"
116
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=ru",
117
+ label: "Русский",
118
+ languageTag: "ru"
119
119
  },
120
120
  {
121
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=sv",
122
- "label": "Svenska",
123
- "languageTag": "sv"
121
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=sv",
122
+ label: "Svenska",
123
+ languageTag: "sv"
124
124
  },
125
125
  {
126
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=pt-BR",
127
- "label": "Português (Brasil)",
128
- "languageTag": "pt-BR"
126
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=pt-BR",
127
+ label: "Português (Brasil)",
128
+ languageTag: "pt-BR"
129
129
  },
130
130
  {
131
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=lt",
132
- "label": "Lietuvių",
133
- "languageTag": "lt"
131
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=lt",
132
+ label: "Lietuvių",
133
+ languageTag: "lt"
134
134
  },
135
135
  {
136
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=en",
137
- "label": "English",
138
- "languageTag": "en"
136
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=en",
137
+ label: "English",
138
+ languageTag: "en"
139
139
  },
140
140
  {
141
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=it",
142
- "label": "Italiano",
143
- "languageTag": "it"
141
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=it",
142
+ label: "Italiano",
143
+ languageTag: "it"
144
144
  },
145
145
  {
146
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=fr",
147
- "label": "Français",
148
- "languageTag": "fr"
146
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=fr",
147
+ label: "Français",
148
+ languageTag: "fr"
149
149
  },
150
150
  {
151
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=zh-CN",
152
- "label": "中文简体",
153
- "languageTag": "zh-CN"
151
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=zh-CN",
152
+ label: "中文简体",
153
+ languageTag: "zh-CN"
154
154
  },
155
155
  {
156
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=es",
157
- "label": "Español",
158
- "languageTag": "es"
156
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=es",
157
+ label: "Español",
158
+ languageTag: "es"
159
159
  },
160
160
  {
161
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=cs",
162
- "label": "Čeština",
163
- "languageTag": "cs"
161
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=cs",
162
+ label: "Čeština",
163
+ languageTag: "cs"
164
164
  },
165
165
  {
166
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=ja",
167
- "label": "日本語",
168
- "languageTag": "ja"
166
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=ja",
167
+ label: "日本語",
168
+ languageTag: "ja"
169
169
  },
170
170
  {
171
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=sk",
172
- "label": "Slovenčina",
173
- "languageTag": "sk"
171
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=sk",
172
+ label: "Slovenčina",
173
+ languageTag: "sk"
174
174
  },
175
175
  {
176
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=pl",
177
- "label": "Polski",
178
- "languageTag": "pl"
176
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=pl",
177
+ label: "Polski",
178
+ languageTag: "pl"
179
179
  },
180
180
  {
181
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=ca",
182
- "label": "Català",
183
- "languageTag": "ca"
181
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=ca",
182
+ label: "Català",
183
+ languageTag: "ca"
184
184
  },
185
185
  {
186
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=nl",
187
- "label": "Nederlands",
188
- "languageTag": "nl"
186
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=nl",
187
+ label: "Nederlands",
188
+ languageTag: "nl"
189
189
  },
190
190
  {
191
- "url": "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=tr",
192
- "label": "Türkçe",
193
- "languageTag": "tr"
191
+ url: "/auth/realms/myrealm/login-actions/authenticate?client_id=account&tab_id=HoAx28ja4xg&execution=ee6c2834-46a4-4a20-a1b6-f6d6f6451b36&kc_locale=tr",
192
+ label: "Türkçe",
193
+ languageTag: "tr"
194
194
  }
195
195
  /* spell-checker: enable */
196
196
  ],
197
- "currentLanguageTag": "en"
197
+ currentLanguageTag: "en"
198
198
  },
199
- "auth": {
200
- "showUsername": false,
201
- "showResetCredentials": false,
202
- "showTryAnotherWayLink": false
199
+ auth: {
200
+ showUsername: false,
201
+ showResetCredentials: false,
202
+ showTryAnotherWayLink: false
203
203
  },
204
- "client": {
205
- "clientId": "myApp",
206
- "attributes": {}
204
+ client: {
205
+ clientId: "myApp",
206
+ attributes: {}
207
207
  },
208
- "scripts": [],
209
- "isAppInitiatedAction": false,
210
- "properties": {}
208
+ scripts: [],
209
+ isAppInitiatedAction: false,
210
+ properties: {}
211
211
  };
212
- const loginUrl = Object.assign(Object.assign({}, kcContextCommonMock.url), { "loginResetCredentialsUrl": "/auth/realms/myrealm/login-actions/reset-credentials?client_id=account&tab_id=HoAx28ja4xg", "registrationUrl": "/auth/realms/myrealm/login-actions/registration?client_id=account&tab_id=HoAx28ja4xg", "oauth2DeviceVerificationAction": "/auth/realms/myrealm/device", "oauthAction": "/auth/realms/myrealm/login-actions/consent?client_id=account&tab_id=HoAx28ja4xg" });
212
+ const loginUrl = Object.assign(Object.assign({}, kcContextCommonMock.url), { loginResetCredentialsUrl: "/auth/realms/myrealm/login-actions/reset-credentials?client_id=account&tab_id=HoAx28ja4xg", registrationUrl: "/auth/realms/myrealm/login-actions/registration?client_id=account&tab_id=HoAx28ja4xg", oauth2DeviceVerificationAction: "/auth/realms/myrealm/device", oauthAction: "/auth/realms/myrealm/login-actions/consent?client_id=account&tab_id=HoAx28ja4xg" });
213
213
  export const kcContextMocks = [
214
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login.ftl", "url": loginUrl, "realm": Object.assign(Object.assign({}, kcContextCommonMock.realm), { "loginWithEmailAllowed": true, "rememberMe": true, "password": true, "resetPasswordAllowed": true, "registrationAllowed": true }), "auth": kcContextCommonMock.auth, "social": {
215
- "displayInfo": true
216
- }, "usernameHidden": false, "login": {}, "registrationDisabled": false })),
217
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "url": Object.assign(Object.assign({}, loginUrl), { "registrationAction": "http://localhost:8080/auth/realms/myrealm/login-actions/registration?session_code=gwZdUeO7pbYpFTRxiIxRg_QtzMbtFTKrNu6XW_f8asM&execution=12146ce0-b139-4bbd-b25b-0eccfee6577e&client_id=account&tab_id=uS8lYfebLa0" }), "isAppInitiatedAction": false, "passwordRequired": true, "recaptchaRequired": false, "pageId": "register.ftl", "profile": {
214
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login.ftl", url: loginUrl, realm: Object.assign(Object.assign({}, kcContextCommonMock.realm), { loginWithEmailAllowed: true, rememberMe: true, password: true, resetPasswordAllowed: true, registrationAllowed: true }), auth: kcContextCommonMock.auth, social: {
215
+ displayInfo: true
216
+ }, usernameHidden: false, login: {}, registrationDisabled: false })),
217
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { url: Object.assign(Object.assign({}, loginUrl), { registrationAction: "http://localhost:8080/auth/realms/myrealm/login-actions/registration?session_code=gwZdUeO7pbYpFTRxiIxRg_QtzMbtFTKrNu6XW_f8asM&execution=12146ce0-b139-4bbd-b25b-0eccfee6577e&client_id=account&tab_id=uS8lYfebLa0" }), isAppInitiatedAction: false, passwordRequired: true, recaptchaRequired: false, pageId: "register.ftl", profile: {
218
218
  attributes,
219
219
  attributesByName
220
- }, "scripts": [
220
+ }, scripts: [
221
221
  //"https://www.google.com/recaptcha/api.js"
222
222
  ] })),
223
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "info.ftl", "messageHeader": "<Message header>", "requiredActions": undefined, "skipLink": false, "actionUri": "#", "client": {
224
- "clientId": "myApp",
225
- "baseUrl": "#",
226
- "attributes": {}
223
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "info.ftl", messageHeader: "<Message header>", requiredActions: undefined, skipLink: false, actionUri: "#", client: {
224
+ clientId: "myApp",
225
+ baseUrl: "#",
226
+ attributes: {}
227
227
  } })),
228
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "error.ftl", "client": {
229
- "clientId": "myApp",
230
- "baseUrl": "#",
231
- "attributes": {}
232
- }, "message": {
233
- "type": "error",
234
- "summary": "This is the error message"
228
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "error.ftl", client: {
229
+ clientId: "myApp",
230
+ baseUrl: "#",
231
+ attributes: {}
232
+ }, message: {
233
+ type: "error",
234
+ summary: "This is the error message"
235
235
  } })),
236
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-reset-password.ftl", "realm": Object.assign(Object.assign({}, kcContextCommonMock.realm), { "loginWithEmailAllowed": false, "duplicateEmailsAllowed": false }), "url": loginUrl, "auth": {} })),
237
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-verify-email.ftl", "user": {
238
- "email": "john.doe@gmail.com"
236
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-reset-password.ftl", realm: Object.assign(Object.assign({}, kcContextCommonMock.realm), { loginWithEmailAllowed: false, duplicateEmailsAllowed: false }), url: loginUrl, auth: {} })),
237
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-verify-email.ftl", user: {
238
+ email: "john.doe@gmail.com"
239
239
  } })),
240
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "terms.ftl" })),
241
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-oauth2-device-verify-user-code.ftl", url: loginUrl })),
242
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-oauth-grant.ftl", oauth: {
240
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "terms.ftl" })),
241
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-oauth2-device-verify-user-code.ftl", url: loginUrl })),
242
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-oauth-grant.ftl", oauth: {
243
243
  code: "5-1N4CIzfi1aprIQjmylI-9e3spLCWW9i5d-GDcs-Sw",
244
244
  clientScopesRequested: [
245
245
  { consentScreenText: "${profileScopeConsentText}" },
@@ -248,67 +248,69 @@ export const kcContextMocks = [
248
248
  ],
249
249
  client: "account"
250
250
  }, url: loginUrl })),
251
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-otp.ftl", "otpLogin": {
252
- "userOtpCredentials": [
251
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-otp.ftl", otpLogin: {
252
+ userOtpCredentials: [
253
253
  {
254
- "id": "id1",
255
- "userLabel": "label1"
254
+ id: "id1",
255
+ userLabel: "label1"
256
256
  },
257
257
  {
258
- "id": "id2",
259
- "userLabel": "label2"
258
+ id: "id2",
259
+ userLabel: "label2"
260
260
  }
261
261
  ]
262
262
  } })),
263
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-username.ftl", "url": loginUrl, "realm": Object.assign(Object.assign({}, kcContextCommonMock.realm), { "loginWithEmailAllowed": true, "rememberMe": true, "password": true, "resetPasswordAllowed": true, "registrationAllowed": true }), "social": {
264
- "displayInfo": true
265
- }, "usernameHidden": false, "login": {}, "registrationDisabled": false })),
266
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-password.ftl", "url": loginUrl, "realm": Object.assign(Object.assign({}, kcContextCommonMock.realm), { "resetPasswordAllowed": true }), "social": {
267
- "displayInfo": false
263
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-username.ftl", url: loginUrl, realm: Object.assign(Object.assign({}, kcContextCommonMock.realm), { loginWithEmailAllowed: true, rememberMe: true, password: true, resetPasswordAllowed: true, registrationAllowed: true }), social: {
264
+ displayInfo: true
265
+ }, usernameHidden: false, login: {}, registrationDisabled: false })),
266
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-password.ftl", url: loginUrl, realm: Object.assign(Object.assign({}, kcContextCommonMock.realm), { resetPasswordAllowed: true }), social: {
267
+ displayInfo: false
268
268
  } })),
269
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "webauthn-authenticate.ftl", "url": loginUrl, "authenticators": {
270
- "authenticators": []
271
- }, "realm": Object.assign(Object.assign({}, kcContextCommonMock.realm), { "password": true, "registrationAllowed": true }), "challenge": "", "userVerification": "not specified", "rpId": "", "createTimeout": "0", "isUserIdentified": "false", "shouldDisplayAuthenticators": false, "social": {
272
- "displayInfo": false
273
- }, "login": {} })),
274
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-update-password.ftl" })),
275
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-update-profile.ftl", "profile": {
269
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "webauthn-authenticate.ftl", url: loginUrl, authenticators: {
270
+ authenticators: []
271
+ }, realm: Object.assign(Object.assign({}, kcContextCommonMock.realm), { password: true, registrationAllowed: true }), challenge: "", userVerification: "not specified", rpId: "", createTimeout: "0", isUserIdentified: "false", shouldDisplayAuthenticators: false, social: {
272
+ displayInfo: false
273
+ }, login: {} })),
274
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-update-password.ftl" })),
275
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-update-profile.ftl", profile: {
276
276
  attributes,
277
277
  attributesByName
278
278
  } })),
279
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-idp-link-confirm.ftl", "idpAlias": "FranceConnect" })),
280
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-idp-link-email.ftl", "idpAlias": "FranceConnect", "brokerContext": {
281
- "username": "anUsername"
279
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-idp-link-confirm.ftl", idpAlias: "FranceConnect" })),
280
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-idp-link-email.ftl", idpAlias: "FranceConnect", brokerContext: {
281
+ username: "anUsername"
282
282
  } })),
283
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "login-config-totp.ftl", "totp": {
284
- "totpSecretEncoded": "KVVF G2BY N4YX S6LB IUYT K2LH IFYE 4SBV",
285
- "qrUrl": "#",
286
- "totpSecretQrCode": "iVBORw0KGgoAAAANSUhEUgAAAPYAAAD2AQAAAADNaUdlAAACM0lEQVR4Xu3OIZJgOQwDUDFd2UxiurLAVnnbHw4YGDKtSiWOn4Gxf81//7r/+q8b4HfLGBZDK9d85NmNR+sB42sXvOYrN5P1DcgYYFTGfOlbzE8gzwy3euweGizw7cfdl34/GRhlkxjKNV+5AebPXPORX1JuB9x8ZfbyyD2y1krWAKsbMq1HnqQDaLfa77p4+MqvzEGSqvSAD/2IHW2yHaigR9tX3m8dDIYGcNf3f+gDpVBZbZU77zyJ6Rlcy+qoTMG887KAPD9hsh6a1Sv3gJUHGHUAxSMzj7zqDDe7Phmt2eG+8UsMxjRGm816MAO+8VMl1R1jGHOrZB/5Zo/WXAPgxixm9Mo96vDGrM1eOto8c4Ax4wF437mifOXlpiPzCnN7Y9l95NnEMxgMY9AAGA8fucH14Y1aVb6N/cqrmyh0BVht7k1e+bU8LK0Cg5vmVq9c5vHIjOfqxDIfeTraNVTwewa4wVe+SW5N+uP1qACeudUZbqGOfA6VZV750Noq2Xx3kpveV44ZelSV1V7KFHzkWyVrrlUwG0Pl9pWnoy3vsQoME6vKI69i5osVgwWzHT7zjmJtMcNUSVn1oYMd7ZodbgowZl45VG0uVuLPUr1yc79uaQBag/mqR34xhlWyHm1prplHboCWdZ4TeZjsK8+dI+jbz1C5hl65mcpgB5dhcj8+dGO+0Ko68+lD37JDD83dpDLzzK+TrQyaVwGj6pUboGV+7+AyN8An/pf84/7rv/4/1l4OCc/1BYMAAAAASUVORK5CYII=",
287
- "manualUrl": "#",
288
- "totpSecret": "G4nsI8lQagRMUchH8jEG",
289
- "otpCredentials": [],
290
- "supportedApplications": ["FreeOTP", "Google Authenticator"],
291
- "policy": {
292
- "algorithm": "HmacSHA1",
293
- "digits": 6,
294
- "lookAheadWindow": 1,
295
- "type": "totp",
296
- "period": 30,
297
- "getAlgorithmKey": () => "SHA1"
283
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-config-totp.ftl", totp: {
284
+ totpSecretEncoded: "KVVF G2BY N4YX S6LB IUYT K2LH IFYE 4SBV",
285
+ qrUrl: "#",
286
+ totpSecretQrCode: "iVBORw0KGgoAAAANSUhEUgAAAPYAAAD2AQAAAADNaUdlAAACM0lEQVR4Xu3OIZJgOQwDUDFd2UxiurLAVnnbHw4YGDKtSiWOn4Gxf81//7r/+q8b4HfLGBZDK9d85NmNR+sB42sXvOYrN5P1DcgYYFTGfOlbzE8gzwy3euweGizw7cfdl34/GRhlkxjKNV+5AebPXPORX1JuB9x8ZfbyyD2y1krWAKsbMq1HnqQDaLfa77p4+MqvzEGSqvSAD/2IHW2yHaigR9tX3m8dDIYGcNf3f+gDpVBZbZU77zyJ6Rlcy+qoTMG887KAPD9hsh6a1Sv3gJUHGHUAxSMzj7zqDDe7Phmt2eG+8UsMxjRGm816MAO+8VMl1R1jGHOrZB/5Zo/WXAPgxixm9Mo96vDGrM1eOto8c4Ax4wF437mifOXlpiPzCnN7Y9l95NnEMxgMY9AAGA8fucH14Y1aVb6N/cqrmyh0BVht7k1e+bU8LK0Cg5vmVq9c5vHIjOfqxDIfeTraNVTwewa4wVe+SW5N+uP1qACeudUZbqGOfA6VZV750Noq2Xx3kpveV44ZelSV1V7KFHzkWyVrrlUwG0Pl9pWnoy3vsQoME6vKI69i5osVgwWzHT7zjmJtMcNUSVn1oYMd7ZodbgowZl45VG0uVuLPUr1yc79uaQBag/mqR34xhlWyHm1prplHboCWdZ4TeZjsK8+dI+jbz1C5hl65mcpgB5dhcj8+dGO+0Ko68+lD37JDD83dpDLzzK+TrQyaVwGj6pUboGV+7+AyN8An/pf84/7rv/4/1l4OCc/1BYMAAAAASUVORK5CYII=",
287
+ manualUrl: "#",
288
+ totpSecret: "G4nsI8lQagRMUchH8jEG",
289
+ otpCredentials: [],
290
+ supportedApplications: ["FreeOTP", "Google Authenticator"],
291
+ policy: {
292
+ algorithm: "HmacSHA1",
293
+ digits: 6,
294
+ lookAheadWindow: 1,
295
+ type: "totp",
296
+ period: 30,
297
+ getAlgorithmKey: () => "SHA1"
298
298
  }
299
299
  } })),
300
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "logout-confirm.ftl", "url": Object.assign(Object.assign({}, kcContextCommonMock.url), { "logoutConfirmAction": "Continuer?" }), "client": {
301
- "clientId": "myApp",
302
- "baseUrl": "#",
303
- "attributes": {}
304
- }, "logoutConfirm": { "code": "123", skipLink: false } })),
305
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "idp-review-user-profile.ftl", "profile": {
300
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "logout-confirm.ftl", url: Object.assign(Object.assign({}, kcContextCommonMock.url), { logoutConfirmAction: "Continuer?" }), client: {
301
+ clientId: "myApp",
302
+ baseUrl: "#",
303
+ attributes: {}
304
+ }, logoutConfirm: { code: "123", skipLink: false } })),
305
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "idp-review-user-profile.ftl", profile: {
306
306
  attributes,
307
307
  attributesByName
308
308
  } })),
309
- id(Object.assign(Object.assign({}, kcContextCommonMock), { "pageId": "update-email.ftl", "profile": {
310
- "attributes": attributes.filter(attribute => attribute.name === "email"),
311
- "attributesByName": Object.fromEntries(attributes.filter(attribute => attribute.name === "email").map(attribute => [attribute.name, attribute]))
309
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "update-email.ftl", profile: {
310
+ attributes: attributes.filter(attribute => attribute.name === "email"),
311
+ attributesByName: Object.fromEntries(attributes
312
+ .filter(attribute => attribute.name === "email")
313
+ .map(attribute => [attribute.name, attribute]))
312
314
  } })),
313
315
  id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "select-authenticator.ftl", auth: {
314
316
  authenticationSelections: [
@@ -326,62 +328,62 @@ export const kcContextMocks = [
326
328
  }
327
329
  ]
328
330
  } })),
329
- id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "saml-post-form.ftl", "samlPost": {
330
- "url": ""
331
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "saml-post-form.ftl", samlPost: {
332
+ url: ""
331
333
  } })),
332
334
  id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "login-page-expired.ftl" })),
333
- id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "frontchannel-logout.ftl", "logout": {
334
- "clients": [
335
+ id(Object.assign(Object.assign({}, kcContextCommonMock), { pageId: "frontchannel-logout.ftl", logout: {
336
+ clients: [
335
337
  {
336
- "name": "myApp",
337
- "frontChannelLogoutUrl": "#"
338
+ name: "myApp",
339
+ frontChannelLogoutUrl: "#"
338
340
  },
339
341
  {
340
- "name": "myApp2",
341
- "frontChannelLogoutUrl": "#"
342
+ name: "myApp2",
343
+ frontChannelLogoutUrl: "#"
342
344
  }
343
345
  ]
344
346
  } })),
345
- id(Object.assign(Object.assign({ "pageId": "webauthn-register.ftl" }, kcContextCommonMock), { "challenge": "random-challenge-string", "userid": "user123", "username": "johndoe", "signatureAlgorithms": ["ES256", "RS256"], "rpEntityName": "Example Corp", "rpId": "example.com", "attestationConveyancePreference": "direct", "authenticatorAttachment": "platform", "requireResidentKey": "required", "userVerificationRequirement": "preferred", "createTimeout": 60000, "excludeCredentialIds": "credId123,credId456", "isSetRetry": false, "isAppInitiatedAction": true })),
346
- id(Object.assign(Object.assign({ "pageId": "delete-credential.ftl" }, kcContextCommonMock), { "credentialLabel": "myCredential" })),
347
- id(Object.assign(Object.assign({ "pageId": "code.ftl" }, kcContextCommonMock), { "code": {
348
- "success": true,
349
- "code": "123456"
347
+ id(Object.assign(Object.assign({ pageId: "webauthn-register.ftl" }, kcContextCommonMock), { challenge: "random-challenge-string", userid: "user123", username: "johndoe", signatureAlgorithms: ["ES256", "RS256"], rpEntityName: "Example Corp", rpId: "example.com", attestationConveyancePreference: "direct", authenticatorAttachment: "platform", requireResidentKey: "required", userVerificationRequirement: "preferred", createTimeout: 60000, excludeCredentialIds: "credId123,credId456", isSetRetry: false, isAppInitiatedAction: true })),
348
+ id(Object.assign(Object.assign({ pageId: "delete-credential.ftl" }, kcContextCommonMock), { credentialLabel: "myCredential" })),
349
+ id(Object.assign(Object.assign({ pageId: "code.ftl" }, kcContextCommonMock), { code: {
350
+ success: true,
351
+ code: "123456"
350
352
  } })),
351
- id(Object.assign(Object.assign({ "pageId": "delete-account-confirm.ftl" }, kcContextCommonMock), { "triggered_from_aia": true })),
352
- id(Object.assign(Object.assign({ "pageId": "login-recovery-authn-code-config.ftl" }, kcContextCommonMock), { "recoveryAuthnCodesConfigBean": {
353
- "generatedRecoveryAuthnCodesList": ["code123", "code456", "code789"],
354
- "generatedRecoveryAuthnCodesAsString": "code123, code456, code789",
355
- "generatedAt": new Date().getTime()
353
+ id(Object.assign(Object.assign({ pageId: "delete-account-confirm.ftl" }, kcContextCommonMock), { triggered_from_aia: true })),
354
+ id(Object.assign(Object.assign({ pageId: "login-recovery-authn-code-config.ftl" }, kcContextCommonMock), { recoveryAuthnCodesConfigBean: {
355
+ generatedRecoveryAuthnCodesList: ["code123", "code456", "code789"],
356
+ generatedRecoveryAuthnCodesAsString: "code123, code456, code789",
357
+ generatedAt: new Date().getTime()
356
358
  } })),
357
- id(Object.assign(Object.assign({ "pageId": "login-recovery-authn-code-input.ftl" }, kcContextCommonMock), { "recoveryAuthnCodesInputBean": {
358
- "codeNumber": 1234
359
+ id(Object.assign(Object.assign({ pageId: "login-recovery-authn-code-input.ftl" }, kcContextCommonMock), { recoveryAuthnCodesInputBean: {
360
+ codeNumber: 1234
359
361
  } })),
360
- id(Object.assign(Object.assign({ "pageId": "login-reset-otp.ftl" }, kcContextCommonMock), { "configuredOtpCredentials": {
361
- "userOtpCredentials": [
362
+ id(Object.assign(Object.assign({ pageId: "login-reset-otp.ftl" }, kcContextCommonMock), { configuredOtpCredentials: {
363
+ userOtpCredentials: [
362
364
  {
363
- "id": "otpId1",
364
- "userLabel": "OTP Device 1"
365
+ id: "otpId1",
366
+ userLabel: "OTP Device 1"
365
367
  },
366
368
  {
367
- "id": "otpId2",
368
- "userLabel": "OTP Device 2"
369
+ id: "otpId2",
370
+ userLabel: "OTP Device 2"
369
371
  },
370
372
  {
371
- "id": "otpId3",
372
- "userLabel": "Backup OTP"
373
+ id: "otpId3",
374
+ userLabel: "Backup OTP"
373
375
  }
374
376
  ],
375
- "selectedCredentialId": "otpId2"
377
+ selectedCredentialId: "otpId2"
376
378
  } })),
377
- id(Object.assign(Object.assign({ "pageId": "login-x509-info.ftl" }, kcContextCommonMock), { "x509": {
378
- "formData": {
379
- "subjectDN": "CN=John Doe, O=Example Corp, C=US",
380
- "isUserEnabled": true,
381
- "username": "johndoe"
379
+ id(Object.assign(Object.assign({ pageId: "login-x509-info.ftl" }, kcContextCommonMock), { x509: {
380
+ formData: {
381
+ subjectDN: "CN=John Doe, O=Example Corp, C=US",
382
+ isUserEnabled: true,
383
+ username: "johndoe"
382
384
  }
383
385
  } })),
384
- id(Object.assign(Object.assign({ "pageId": "webauthn-error.ftl" }, kcContextCommonMock), { "isAppInitiatedAction": true }))
386
+ id(Object.assign(Object.assign({ pageId: "webauthn-error.ftl" }, kcContextCommonMock), { isAppInitiatedAction: true }))
385
387
  ];
386
388
  {
387
389
  assert();