webauthn-error.ftl 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <#import "template.ftl" as layout>
  2. <@layout.registrationLayout displayMessage=true; section>
  3. <#if section = "header">
  4. ${kcSanitize(msg("webauthn-error-title"))?no_esc}
  5. <#elseif section = "form">
  6. <script type="text/javascript">
  7. refreshPage = () => {
  8. document.getElementById('isSetRetry').value = 'retry';
  9. document.getElementById('executionValue').value = '${execution}';
  10. document.getElementById('kc-error-credential-form').submit();
  11. }
  12. </script>
  13. <form id="kc-error-credential-form" class="${properties.kcFormClass!}" action="${url.loginAction}"
  14. method="post">
  15. <input type="hidden" id="executionValue" name="authenticationExecution"/>
  16. <input type="hidden" id="isSetRetry" name="isSetRetry"/>
  17. </form>
  18. <#if authenticators??>
  19. <table class="table">
  20. <thead>
  21. <tr>
  22. <th>${kcSanitize(msg("webauthn-available-authenticators"))?no_esc}</th>
  23. </tr>
  24. </thead>
  25. <tbody>
  26. <#list authenticators.authenticators as authenticator>
  27. <tr>
  28. <th>
  29. <span id="kc-webauthn-authenticator">${kcSanitize(authenticator.label)?no_esc}</span>
  30. </th>
  31. </tr>
  32. </#list>
  33. </tbody>
  34. </table>
  35. </#if>
  36. <input tabindex="4" onclick="refreshPage()" type="button"
  37. class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}"
  38. name="try-again" id="kc-try-again" value="${kcSanitize(msg("doTryAgain"))?no_esc}"
  39. />
  40. <#if isAppInitiatedAction??>
  41. <form action="${url.loginAction}" class="${properties.kcFormClass!}" id="kc-webauthn-settings-form" method="post">
  42. <button type="submit"
  43. class="${properties.kcButtonClass!} ${properties.kcButtonDefaultClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}"
  44. id="cancelWebAuthnAIA" name="cancel-aia" value="true"/>${msg("doCancel")}
  45. </button>
  46. </form>
  47. </#if>
  48. </#if>
  49. </@layout.registrationLayout>