diff options
Diffstat (limited to 'login/webauthn-error.ftl')
-rw-r--r-- | login/webauthn-error.ftl | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/login/webauthn-error.ftl b/login/webauthn-error.ftl new file mode 100644 index 0000000..ed904f9 --- /dev/null +++ b/login/webauthn-error.ftl @@ -0,0 +1,55 @@ +<#import "template.ftl" as layout> +<@layout.registrationLayout displayMessage=true; section> + <#if section = "header"> + ${kcSanitize(msg("webauthn-error-title"))?no_esc} + <#elseif section = "form"> + + <script type="text/javascript"> + refreshPage = () => { + document.getElementById('isSetRetry').value = 'retry'; + document.getElementById('executionValue').value = '${execution}'; + document.getElementById('kc-error-credential-form').submit(); + } + </script> + + <form id="kc-error-credential-form" class="${properties.kcFormClass!}" action="${url.loginAction}" + method="post"> + <input type="hidden" id="executionValue" name="authenticationExecution"/> + <input type="hidden" id="isSetRetry" name="isSetRetry"/> + </form> + + <#if authenticators??> + <table class="table"> + <thead> + <tr> + <th>${kcSanitize(msg("webauthn-available-authenticators"))?no_esc}</th> + </tr> + </thead> + <tbody> + <#list authenticators.authenticators as authenticator> + <tr> + <th> + <span id="kc-webauthn-authenticator">${kcSanitize(authenticator.label)?no_esc}</span> + </th> + </tr> + </#list> + </tbody> + </table> + </#if> + + <input tabindex="4" onclick="refreshPage()" type="button" + class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" + name="try-again" id="kc-try-again" value="${kcSanitize(msg("doTryAgain"))?no_esc}" + /> + + <#if isAppInitiatedAction??> + <form action="${url.loginAction}" class="${properties.kcFormClass!}" id="kc-webauthn-settings-form" method="post"> + <button type="submit" + class="${properties.kcButtonClass!} ${properties.kcButtonDefaultClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" + id="cancelWebAuthnAIA" name="cancel-aia" value="true"/>${msg("doCancel")} + </button> + </form> + </#if> + + </#if> +</@layout.registrationLayout>
\ No newline at end of file |