theme.base.account.totp.ftl Maven / Gradle / Ivy
<#import "template.ftl" as layout>
<@layout.mainLayout active='totp' bodyClass='totp'; section>
${msg("authenticatorTitle")}
<#if totp.enabled>
<#if totp.otpCredentials?size gt 1>
${msg("configureAuthenticators")}
<#else>
${msg("configureAuthenticators")}
<#list totp.otpCredentials as credential>
${msg("mobile")}
<#if totp.otpCredentials?size gt 1>
${credential.id}
${credential.userLabel!}
<#else>
-
${msg("totpStep1")}
<#list totp.policy.supportedApplications as app>
- ${app}
<#if mode?? && mode = "manual">
-
${msg("totpManualStep2")}
${totp.totpSecretEncoded}
-
${msg("totpManualStep3")}
- ${msg("totpType")}: ${msg("totp." + totp.policy.type)}
- ${msg("totpAlgorithm")}: ${totp.policy.getAlgorithmKey()}
- ${msg("totpDigits")}: ${totp.policy.digits}
<#if totp.policy.type = "totp">
- ${msg("totpInterval")}: ${totp.policy.period}
<#elseif totp.policy.type = "hotp">
- ${msg("totpCounter")}: ${totp.policy.initialCounter}
<#else>
-
${msg("totpStep2")}
![Figure: Barcode](data:image/png;base64, ${totp.totpSecretQrCode})
-
${msg("totpStep3")}