2021-03-04 21:14:54 +01:00
|
|
|
|
<script>const _=
|
|
|
|
|
{
|
|
|
|
|
"url": {
|
2021-03-05 01:35:50 +01:00
|
|
|
|
"loginAction": "${url.loginAction?no_esc}",
|
|
|
|
|
"resourcesPath": "${url.resourcesPath?no_esc}",
|
|
|
|
|
"resourcesCommonPath": "${url.resourcesCommonPath?no_esc}",
|
|
|
|
|
"loginRestartFlowUrl": "${url.loginRestartFlowUrl?no_esc}",
|
|
|
|
|
"loginUrl": "${url.loginUrl?no_esc}"
|
2021-03-04 21:14:54 +01:00
|
|
|
|
},
|
|
|
|
|
"realm": {
|
|
|
|
|
"displayName": "${realm.displayName!''}" || undefined,
|
|
|
|
|
"displayNameHtml": "${realm.displayNameHtml!''}" || undefined,
|
|
|
|
|
"internationalizationEnabled": ${realm.internationalizationEnabled?c},
|
|
|
|
|
"registrationEmailAsUsername": ${realm.registrationEmailAsUsername?c},
|
|
|
|
|
},
|
|
|
|
|
"locale": (function (){
|
|
|
|
|
|
|
|
|
|
<#if realm.internationalizationEnabled>
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
"supported": (function(){
|
|
|
|
|
|
|
|
|
|
<#if realm.internationalizationEnabled>
|
|
|
|
|
|
|
|
|
|
var out= [];
|
|
|
|
|
|
|
|
|
|
<#list locale.supported as lng>
|
|
|
|
|
out.push({
|
2021-03-05 01:35:50 +01:00
|
|
|
|
"url": "${lng.url?no_esc}",
|
2021-03-04 21:14:54 +01:00
|
|
|
|
"label": "${lng.label}",
|
|
|
|
|
"languageTag": "${lng.languageTag}"
|
|
|
|
|
});
|
|
|
|
|
</#list>
|
|
|
|
|
|
|
|
|
|
return out;
|
|
|
|
|
|
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
|
|
|
|
|
|
})(),
|
|
|
|
|
"current": "${locale.current}"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
|
|
|
|
|
|
})(),
|
|
|
|
|
"auth": (function (){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<#if auth?has_content>
|
|
|
|
|
|
|
|
|
|
var out= {
|
|
|
|
|
"showUsername": ${auth.showUsername()?c},
|
|
|
|
|
"showResetCredentials": ${auth.showResetCredentials()?c},
|
|
|
|
|
"showTryAnotherWayLink": ${auth.showTryAnotherWayLink()?c},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
<#if auth.showUsername() && !auth.showResetCredentials()>
|
|
|
|
|
Object.assign(
|
|
|
|
|
out,
|
|
|
|
|
{
|
|
|
|
|
"attemptedUsername": "${auth.attemptedUsername}"
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
return out;
|
|
|
|
|
|
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
|
|
|
|
|
|
})(),
|
|
|
|
|
"scripts": (function(){
|
|
|
|
|
|
|
|
|
|
var out = [];
|
|
|
|
|
|
|
|
|
|
<#if scripts??>
|
|
|
|
|
<#list scripts as script>
|
|
|
|
|
out.push("${script}");
|
|
|
|
|
</#list>
|
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
return out;
|
|
|
|
|
|
|
|
|
|
})(),
|
|
|
|
|
"message": (function (){
|
|
|
|
|
|
|
|
|
|
<#if message?has_content>
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
"type": "${message.type}",
|
2021-03-07 01:47:03 +01:00
|
|
|
|
"summary": String.htmlUnescape("${message.summary}")
|
2021-03-04 21:14:54 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
</#if>
|
|
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
|
|
|
|
|
|
})(),
|
|
|
|
|
"isAppInitiatedAction": (function (){
|
|
|
|
|
|
|
|
|
|
<#if isAppInitiatedAction??>
|
|
|
|
|
return true;
|
|
|
|
|
</#if>
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
})()
|
|
|
|
|
}
|
|
|
|
|
</script>
|