keycloakify 8.4.1 → 8.4.3

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.
@@ -408,6 +408,14 @@
408
408
  out["themeName"] = "KEYCLOAKIFY_THEME_NAME_cXxKd3xEer";
409
409
  out["pageId"] = "${pageId}";
410
410
 
411
+ try {
412
+
413
+ out["url"]["resourcesCommonPath"] = out["url"]["resourcesPath"] + "/" + "RESOURCES_COMMON_cLsLsMrtDkpVv";
414
+
415
+ } catch(error) {
416
+
417
+ }
418
+
411
419
  return out;
412
420
 
413
421
  })()
@@ -423,7 +431,7 @@
423
431
  <#if isHash>
424
432
 
425
433
  <#if path?size gt 10>
426
- <#return "ABORT: Too many recursive calls">
434
+ <#return "ABORT: Too many recursive calls, path: " + path?join(".")>
427
435
  </#if>
428
436
 
429
437
  <#local keys = "">
@@ -455,9 +463,10 @@
455
463
  <#-- https://github.com/keycloakify/keycloakify/issues/91#issue-1212319466 (reports with error.ftl and Kc18) -->
456
464
  <#-- https://github.com/keycloakify/keycloakify/issues/109#issuecomment-1134610163 -->
457
465
  <#-- https://github.com/keycloakify/keycloakify/issues/357 -->
466
+ <#-- https://github.com/keycloakify/keycloakify/discussions/406#discussioncomment-7514787 -->
458
467
  key == "loginAction" &&
459
468
  are_same_path(path, ["url"]) &&
460
- ["saml-post-form.ftl", "error.ftl", "info.ftl", "login-oauth-grant.ftl", "logout-confirm.ftl"]?seq_contains(pageId) &&
469
+ ["saml-post-form.ftl", "error.ftl", "info.ftl", "login-oauth-grant.ftl", "logout-confirm.ftl", "login-oauth2-device-verify-user-code.ftl"]?seq_contains(pageId) &&
461
470
  !(auth?has_content && auth.showTryAnotherWayLink())
462
471
  ) || (
463
472
  <#-- https://github.com/keycloakify/keycloakify/issues/362 -->
@@ -480,24 +489,33 @@
480
489
  !["name", "displayName", "displayNameHtml", "internationalizationEnabled", "registrationEmailAsUsername" ]?seq_contains(key)
481
490
  ) || (
482
491
  "applications.ftl" == pageId &&
483
- are_same_path(path, ["applications", "applications", "*", "client", "realm"])
492
+ is_subpath(path, ["applications", "applications"]) &&
493
+ (
494
+ key == "realm" ||
495
+ key == "container"
496
+ )
484
497
  ) || (
485
- "applications.ftl" == pageId &&
486
- "masterAdminClient" == key
498
+ are_same_path(path, ["user"]) &&
499
+ key == "delegateForUpdate"
487
500
  )
488
501
  >
489
- <#local out_seq += ["/*If you need '" + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
502
+ <#local out_seq += ["/*If you need '" + path?join(".") + "." + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
490
503
  <#continue>
491
504
  </#if>
492
505
 
493
- <#if pageId == "register.ftl" && key == "attemptedUsername" && are_same_path(path, ["auth"])>
506
+ <#-- https://github.com/keycloakify/keycloakify/discussions/406 -->
507
+ <#if (
508
+ ["register.ftl", "info.ftl", "login.ftl", "login-update-password.ftl", "login-oauth2-device-verify-user-code.ftl"]?seq_contains(pageId) &&
509
+ key == "attemptedUsername" && are_same_path(path, ["auth"])
510
+ )>
494
511
  <#attempt>
495
512
  <#-- https://github.com/keycloak/keycloak/blob/3a2bf0c04bcde185e497aaa32d0bb7ab7520cf4a/themes/src/main/resources/theme/base/login/template.ftl#L63 -->
496
- <#-- https://github.com/keycloakify/keycloakify/discussions/406 -->
497
513
  <#if !(auth?has_content && auth.showUsername() && !auth.showResetCredentials())>
514
+ <#local out_seq += ["/*If you need '" + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
498
515
  <#continue>
499
516
  </#if>
500
517
  <#recover>
518
+ <#local out_seq += ["/*Testing if attemptedUsername should be skipped throwed an exception */"]>
501
519
  </#attempt>
502
520
  </#if>
503
521
 
@@ -650,9 +668,9 @@
650
668
  <#return "ABORT: Couldn't convert into string non hash, non method, non boolean, non enumerable object">
651
669
 
652
670
  </#function>
653
- <#function are_same_path path searchedPath>
671
+ <#function is_subpath path searchedPath>
654
672
 
655
- <#if path?size != searchedPath?size>
673
+ <#if path?size < searchedPath?size>
656
674
  <#return false>
657
675
  </#if>
658
676
 
@@ -660,8 +678,14 @@
660
678
 
661
679
  <#list path as property>
662
680
 
681
+ <#if i == searchedPath?size >
682
+ <#continue>
683
+ </#if>
684
+
663
685
  <#local searchedProperty=searchedPath[i]>
664
686
 
687
+ <#local i+= 1>
688
+
665
689
  <#if searchedProperty?is_string && searchedProperty == "*">
666
690
  <#continue>
667
691
  </#if>
@@ -678,11 +702,13 @@
678
702
  <#return false>
679
703
  </#if>
680
704
 
681
- <#local i+= 1>
682
-
683
705
  </#list>
684
706
 
685
707
  <#return true>
686
708
 
687
709
  </#function>
710
+
711
+ <#function are_same_path path searchedPath>
712
+ <#return path?size == searchedPath?size && is_subpath(path, searchedPath)>
713
+ </#function>
688
714
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "8.4.1",
3
+ "version": "8.4.3",
4
4
  "description": "Create Keycloak themes using React",
5
5
  "repository": {
6
6
  "type": "git",
@@ -408,6 +408,14 @@
408
408
  out["themeName"] = "KEYCLOAKIFY_THEME_NAME_cXxKd3xEer";
409
409
  out["pageId"] = "${pageId}";
410
410
 
411
+ try {
412
+
413
+ out["url"]["resourcesCommonPath"] = out["url"]["resourcesPath"] + "/" + "RESOURCES_COMMON_cLsLsMrtDkpVv";
414
+
415
+ } catch(error) {
416
+
417
+ }
418
+
411
419
  return out;
412
420
 
413
421
  })()
@@ -423,7 +431,7 @@
423
431
  <#if isHash>
424
432
 
425
433
  <#if path?size gt 10>
426
- <#return "ABORT: Too many recursive calls">
434
+ <#return "ABORT: Too many recursive calls, path: " + path?join(".")>
427
435
  </#if>
428
436
 
429
437
  <#local keys = "">
@@ -455,9 +463,10 @@
455
463
  <#-- https://github.com/keycloakify/keycloakify/issues/91#issue-1212319466 (reports with error.ftl and Kc18) -->
456
464
  <#-- https://github.com/keycloakify/keycloakify/issues/109#issuecomment-1134610163 -->
457
465
  <#-- https://github.com/keycloakify/keycloakify/issues/357 -->
466
+ <#-- https://github.com/keycloakify/keycloakify/discussions/406#discussioncomment-7514787 -->
458
467
  key == "loginAction" &&
459
468
  are_same_path(path, ["url"]) &&
460
- ["saml-post-form.ftl", "error.ftl", "info.ftl", "login-oauth-grant.ftl", "logout-confirm.ftl"]?seq_contains(pageId) &&
469
+ ["saml-post-form.ftl", "error.ftl", "info.ftl", "login-oauth-grant.ftl", "logout-confirm.ftl", "login-oauth2-device-verify-user-code.ftl"]?seq_contains(pageId) &&
461
470
  !(auth?has_content && auth.showTryAnotherWayLink())
462
471
  ) || (
463
472
  <#-- https://github.com/keycloakify/keycloakify/issues/362 -->
@@ -480,24 +489,33 @@
480
489
  !["name", "displayName", "displayNameHtml", "internationalizationEnabled", "registrationEmailAsUsername" ]?seq_contains(key)
481
490
  ) || (
482
491
  "applications.ftl" == pageId &&
483
- are_same_path(path, ["applications", "applications", "*", "client", "realm"])
492
+ is_subpath(path, ["applications", "applications"]) &&
493
+ (
494
+ key == "realm" ||
495
+ key == "container"
496
+ )
484
497
  ) || (
485
- "applications.ftl" == pageId &&
486
- "masterAdminClient" == key
498
+ are_same_path(path, ["user"]) &&
499
+ key == "delegateForUpdate"
487
500
  )
488
501
  >
489
- <#local out_seq += ["/*If you need '" + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
502
+ <#local out_seq += ["/*If you need '" + path?join(".") + "." + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
490
503
  <#continue>
491
504
  </#if>
492
505
 
493
- <#if pageId == "register.ftl" && key == "attemptedUsername" && are_same_path(path, ["auth"])>
506
+ <#-- https://github.com/keycloakify/keycloakify/discussions/406 -->
507
+ <#if (
508
+ ["register.ftl", "info.ftl", "login.ftl", "login-update-password.ftl", "login-oauth2-device-verify-user-code.ftl"]?seq_contains(pageId) &&
509
+ key == "attemptedUsername" && are_same_path(path, ["auth"])
510
+ )>
494
511
  <#attempt>
495
512
  <#-- https://github.com/keycloak/keycloak/blob/3a2bf0c04bcde185e497aaa32d0bb7ab7520cf4a/themes/src/main/resources/theme/base/login/template.ftl#L63 -->
496
- <#-- https://github.com/keycloakify/keycloakify/discussions/406 -->
497
513
  <#if !(auth?has_content && auth.showUsername() && !auth.showResetCredentials())>
514
+ <#local out_seq += ["/*If you need '" + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
498
515
  <#continue>
499
516
  </#if>
500
517
  <#recover>
518
+ <#local out_seq += ["/*Testing if attemptedUsername should be skipped throwed an exception */"]>
501
519
  </#attempt>
502
520
  </#if>
503
521
 
@@ -650,9 +668,9 @@
650
668
  <#return "ABORT: Couldn't convert into string non hash, non method, non boolean, non enumerable object">
651
669
 
652
670
  </#function>
653
- <#function are_same_path path searchedPath>
671
+ <#function is_subpath path searchedPath>
654
672
 
655
- <#if path?size != searchedPath?size>
673
+ <#if path?size < searchedPath?size>
656
674
  <#return false>
657
675
  </#if>
658
676
 
@@ -660,8 +678,14 @@
660
678
 
661
679
  <#list path as property>
662
680
 
681
+ <#if i == searchedPath?size >
682
+ <#continue>
683
+ </#if>
684
+
663
685
  <#local searchedProperty=searchedPath[i]>
664
686
 
687
+ <#local i+= 1>
688
+
665
689
  <#if searchedProperty?is_string && searchedProperty == "*">
666
690
  <#continue>
667
691
  </#if>
@@ -678,11 +702,13 @@
678
702
  <#return false>
679
703
  </#if>
680
704
 
681
- <#local i+= 1>
682
-
683
705
  </#list>
684
706
 
685
707
  <#return true>
686
708
 
687
709
  </#function>
710
+
711
+ <#function are_same_path path searchedPath>
712
+ <#return path?size == searchedPath?size && is_subpath(path, searchedPath)>
713
+ </#function>
688
714
  </script>