1<#import "template.ftl" as layout>
2<#import "password-commons.ftl" as passwordCommons>
3
4<@layout.registrationLayout; section>
5 <#if section = "title">
6 title
7 <#elseif section = "header">
8 <div class="alert-info pf-v5-c-alert pf-m-inline pf-v5-u-mb-md pf-m-danger">
9 <div class="pf-c-alert__icon">
10 <span class=""></span>
11 </div>
12 <span class="pf-v5-c-alert__title">
13 you will be prompted to create a passkey. please contact clover if
14 this doesn't work in your browser.
15 </span>
16 </div>
17 <#elseif section = "form">
18
19 <form id="register" class="${properties.kcFormClass!}" action="${url.loginAction}" method="post">
20 <div class="${properties.kcFormGroupClass!}">
21 <input type="hidden" id="clientDataJSON" name="clientDataJSON"/>
22 <input type="hidden" id="attestationObject" name="attestationObject"/>
23 <input type="hidden" id="publicKeyCredentialId" name="publicKeyCredentialId"/>
24 <input type="hidden" id="authenticatorLabel" name="authenticatorLabel"/>
25 <input type="hidden" id="transports" name="transports"/>
26 <input type="hidden" id="error" name="error"/>
27 </div>
28 </form>
29
30 <script type="module">
31 import { registerByWebAuthn } from "${url.resourcesPath}/js/webauthnRegister.js";
32 function init() {
33 const input = {
34 challenge : '${challenge}',
35 userid : '${userid}',
36 username : '${username}',
37 signatureAlgorithms : [<#list signatureAlgorithms as sigAlg>${sigAlg?c},</#list>],
38 rpEntityName : '${rpEntityName}',
39 rpId : '${rpId}',
40 attestationConveyancePreference : '${attestationConveyancePreference}',
41 authenticatorAttachment : '${authenticatorAttachment}',
42 requireResidentKey : '${requireResidentKey}',
43 userVerificationRequirement : '${userVerificationRequirement}',
44 createTimeout : ${createTimeout?c},
45 excludeCredentialIds : '${excludeCredentialIds}',
46 initLabel : "${msg("webauthn-registration-init-label")?no_esc}",
47 initLabelPrompt : "${msg("webauthn-registration-init-label-prompt")?no_esc}",
48 errmsg : "${msg("webauthn-unsupported-browser-text")?no_esc}"
49 };
50 registerByWebAuthn(input);
51 }
52 init();
53 </script>
54
55<!--
56 <input type="submit"
57 class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}"
58 id="registerWebAuthn" value="${msg("doRegisterSecurityKey")}"/>
59-->
60
61 <#if !isSetRetry?has_content && isAppInitiatedAction?has_content>
62 <form action="${url.loginAction}" class="${properties.kcFormClass!}" id="kc-webauthn-settings-form"
63 method="post">
64 <button type="submit"
65 class="${properties.kcButtonClass!} ${properties.kcButtonDefaultClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}"
66 id="cancelWebAuthnAIA" name="cancel-aia" value="true">${msg("doCancel")}
67 </button>
68 </form>
69 </#if>
70
71 </#if>
72</@layout.registrationLayout>