diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionTotpSetupTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionTotpSetupTest.java index f42a14642a..6b1a39fa3a 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionTotpSetupTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionTotpSetupTest.java @@ -219,7 +219,7 @@ public class RequiredActionTotpSetupTest extends AbstractTestRealmKeycloakTest { assertEquals("Type: Counter-based", driver.findElement(By.id("kc-totp-type")).getText()); assertEquals("Algorithm: HmacSHA256", driver.findElement(By.id("kc-totp-algorithm")).getText()); assertEquals("Digits: 8", driver.findElement(By.id("kc-totp-digits")).getText()); - assertEquals("Interval: 30", driver.findElement(By.id("kc-totp-period")).getText()); + assertEquals("Counter: 0", driver.findElement(By.id("kc-totp-counter")).getText()); } finally { rep.setOtpPolicyDigits(6); rep.setOtpPolicyType("totp"); diff --git a/themes/src/main/resources/theme/base/account/messages/messages_en.properties b/themes/src/main/resources/theme/base/account/messages/messages_en.properties index b943edcfdc..44f4bf241e 100755 --- a/themes/src/main/resources/theme/base/account/messages/messages_en.properties +++ b/themes/src/main/resources/theme/base/account/messages/messages_en.properties @@ -114,6 +114,7 @@ totpType=Type totpAlgorithm=Algorithm totpDigits=Digits totpInterval=Interval +totpCounter=Counter missingUsernameMessage=Please specify username. missingFirstNameMessage=Please specify first name. diff --git a/themes/src/main/resources/theme/base/account/totp.ftl b/themes/src/main/resources/theme/base/account/totp.ftl index e94eb810ba..689a1db5b9 100755 --- a/themes/src/main/resources/theme/base/account/totp.ftl +++ b/themes/src/main/resources/theme/base/account/totp.ftl @@ -51,7 +51,11 @@
  • ${msg("totpType")}: ${msg("totp." + totp.policy.type)}
  • ${msg("totpAlgorithm")}: ${totp.policy.algorithm}
  • ${msg("totpDigits")}: ${totp.policy.digits}
  • -
  • ${msg("totpInterval")}: ${totp.policy.period}
  • + <#if totp.policy.type = "totp"> +
  • ${msg("totpInterval")}: ${totp.policy.period}
  • + <#elseif totp.policy.type = "hotp"> +
  • ${msg("totpCounter")}: ${totp.policy.initialCounter}
  • + <#else> diff --git a/themes/src/main/resources/theme/base/login/login-config-totp.ftl b/themes/src/main/resources/theme/base/login/login-config-totp.ftl index 24383ecd5b..008a63d6cd 100755 --- a/themes/src/main/resources/theme/base/login/login-config-totp.ftl +++ b/themes/src/main/resources/theme/base/login/login-config-totp.ftl @@ -30,7 +30,11 @@
  • ${msg("loginTotpType")}: ${msg("loginTotp." + totp.policy.type)}
  • ${msg("loginTotpAlgorithm")}: ${totp.policy.algorithm}
  • ${msg("loginTotpDigits")}: ${totp.policy.digits}
  • -
  • ${msg("loginTotpInterval")}: ${totp.policy.period}
  • + <#if totp.policy.type = "totp"> +
  • ${msg("loginTotpInterval")}: ${totp.policy.period}
  • + <#elseif totp.policy.type = "hotp"> +
  • ${msg("loginTotpCounter")}: ${totp.policy.initialCounter}
  • + <#else> diff --git a/themes/src/main/resources/theme/base/login/messages/messages_en.properties b/themes/src/main/resources/theme/base/login/messages/messages_en.properties index 7c5a22db2a..e6eb26125a 100755 --- a/themes/src/main/resources/theme/base/login/messages/messages_en.properties +++ b/themes/src/main/resources/theme/base/login/messages/messages_en.properties @@ -80,6 +80,7 @@ loginTotpType=Type loginTotpAlgorithm=Algorithm loginTotpDigits=Digits loginTotpInterval=Interval +loginTotpCounter=Counter loginTotp.totp=Time-based loginTotp.hotp=Counter-based