This commit is contained in:
garronej
2022-05-23 16:51:18 +02:00
parent f5231b840d
commit 9de0083ca6
2 changed files with 33 additions and 4 deletions

View File

@ -124,9 +124,11 @@ ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc};
) || ( ) || (
<#-- https://github.com/InseeFrLab/keycloakify/pull/65#issuecomment-991896344 (reports with saml-post-form.ftl) --> <#-- https://github.com/InseeFrLab/keycloakify/pull/65#issuecomment-991896344 (reports with saml-post-form.ftl) -->
<#-- https://github.com/InseeFrLab/keycloakify/issues/91#issue-1212319466 (reports with error.ftl and Kc18) --> <#-- https://github.com/InseeFrLab/keycloakify/issues/91#issue-1212319466 (reports with error.ftl and Kc18) -->
<#-- https://github.com/InseeFrLab/keycloakify/issues/109#issuecomment-1134610163 -->
key == "loginAction" && key == "loginAction" &&
are_same_path(path, ["url"]) && are_same_path(path, ["url"]) &&
["saml-post-form.ftl", "error.ftl"]?seq_contains(pageId) ["saml-post-form.ftl", "error.ftl", "info.ftl"]?seq_contains(pageId) &&
!(auth?has_content && auth.showTryAnotherWayLink())
) || ( ) || (
["contextData", "idpConfig", "idp", "authenticationSession"]?seq_contains(key) && ["contextData", "idpConfig", "idp", "authenticationSession"]?seq_contains(key) &&
are_same_path(path, ["brokerContext"]) && are_same_path(path, ["brokerContext"]) &&
@ -152,6 +154,33 @@ ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc};
</#attempt> </#attempt>
</#if> </#if>
<#if key == "showUsername" && are_same_path(path, ["auth"])>
<#attempt>
<#return auth.showUsername()?c>
<#recover>
<#local out_seq += ["/*Couldn't evaluate auth.showUsername()*/"]>
<#continue>
</#attempt>
</#if>
<#if key == "showResetCredentials" && are_same_path(path, ["auth"])>
<#attempt>
<#return auth.showResetCredentials()?c>
<#recover>
<#local out_seq += ["/*Couldn't evaluate auth.showResetCredentials()*/"]>
<#continue>
</#attempt>
</#if>
<#if key == "showTryAnotherWayLink" && are_same_path(path, ["auth"])>
<#attempt>
<#return auth.showTryAnotherWayLink()?c>
<#recover>
<#local out_seq += ["/*Couldn't evaluate auth.showTryAnotherWayLink()*/"]>
<#continue>
</#attempt>
</#if>
<#attempt> <#attempt>
<#if !object[key]??> <#if !object[key]??>

View File

@ -52,9 +52,9 @@ export declare namespace KcContextBase {
currentLanguageTag: KcLanguageTag; currentLanguageTag: KcLanguageTag;
}; };
auth?: { auth?: {
showUsername: boolean; showUsername?: boolean;
showResetCredentials: boolean; showResetCredentials?: boolean;
showTryAnotherWayLink: boolean; showTryAnotherWayLink?: boolean;
attemptedUsername?: string; attemptedUsername?: string;
}; };
scripts: string[]; scripts: string[];